TTT-2 / ttt2-wep_defi

2 stars 7 forks source link

fixed null entity issue #19

Closed mexikoedi closed 1 month ago

mexikoedi commented 2 months ago

This fixes the following issue:

[[TTT2] Defibrillator [WEAPON]] gamemodes/terrortown/entities/weapons/weapon_ttt_defibrillator.lua:216: Tried to use a NULL entity!
  1. GetPhysicsObjectNum - [C]:-1
   2. FinishRevival - gamemodes/terrortown/entities/weapons/weapon_ttt_defibrillator.lua:216
    3. unknown - gamemodes/terrortown/entities/weapons/weapon_ttt_defibrillator.lua:273

This should fix the error and make the code more robust.