Drop activated grenade, when player switches to edit mode

This commit is contained in:
aurhat
2014-07-19 14:38:33 +02:00
committed by ac-stef
parent 69cbf95401
commit 38d88602aa
+1
View File
@@ -51,6 +51,7 @@ void toggleedit(bool force)
player1->state = player1->state==CS_SPECTATE?CS_SPECTATE:(editing ? CS_EDITING : CS_ALIVE);
if(editing && player1->onladder) player1->onladder = false;
if(editing && (player1->weaponsel->type == GUN_SNIPER && ((sniperrifle *)player1->weaponsel)->scoped)) ((sniperrifle *)player1->weaponsel)->onownerdies(); // or ondeselecting()
if(editing && (player1->weaponsel->type == GUN_GRENADE)) ((grenades *)player1->weaponsel)->onownerdies();
if(!force) addmsg(SV_EDITMODE, "ri", editing);
}