File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -244,15 +244,14 @@ struct SDefNewsMsg{
244244 void detach_Vehicle ();
245245 void steer_Vehicle (float angle);
246246 void attach_Vehicle (CHolderCustom* vehicle);
247-
247+ bool use_MountedWeapon (CHolderCustom* object);
248248 virtual bool can_attach (const CInventoryItem *inventory_item) const ;
249249protected:
250250 CHolderCustom* m_holder;
251251 u16 m_holderID;
252252 bool use_Holder (CHolderCustom* holder);
253253
254254 bool use_Vehicle (CHolderCustom* object);
255- bool use_MountedWeapon (CHolderCustom* object);
256255 void ActorUse ();
257256
258257protected:
Original file line number Diff line number Diff line change @@ -246,6 +246,11 @@ void CEntity::net_Destroy ()
246246
247247void CEntity::KillEntity (u16 whoID)
248248{
249+ if (this ->ID () == Actor ()->ID ())
250+ {
251+ Actor ()->detach_Vehicle ();
252+ Actor ()->use_MountedWeapon (NULL );
253+ }
249254 if (whoID != ID ()) {
250255#ifdef DEBUG
251256 if (m_killer_id != ALife::_OBJECT_ID (-1 )) {
You can’t perform that action at this time.
0 commit comments