fix(CustomWeapons): Fix Gravity Gun not doing cleanup when failing REQUEST_CONTROL

Fixes #40
This commit is contained in:
Yimura 2022-01-08 14:09:00 +01:00
parent 9730c50d97
commit f6ba4d8257
No known key found for this signature in database
GPG Key ID: 3D8FF4397E768682

View File

@ -76,7 +76,12 @@ namespace big
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 15))
dist += 5;
if (!entity::take_control_of(ent)) return;
if (!entity::take_control_of(ent))
{
ent = 0;
return notify::above_map("Failed to take control of entity.");
}
ENTITY::SET_ENTITY_COLLISION(ent, false, false);