TTT-2 / ttt2-wep_defi

2 stars 7 forks source link

fixed IsReviving nil value issue #18

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:335: attempt to call method 'IsReviving' (a nil value)
  1. func - gamemodes/terrortown/entities/weapons/weapon_ttt_defibrillator.lua:335
   2. unknown - lua/includes/extensions/net.lua:38

[TTT2 (Base) - v0.13.2b] Warning! A net message (ReceiveRevivalStatus) is already started! Discarding in favor of the new message! (StartDrowning)
  1. StartDrowning - gamemodes/terrortown/gamemode/shared/sh_player_ext.lua:973
   2. unknown - gamemodes/terrortown/gamemode/shared/sh_main.lua:471

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

mexikoedi commented 1 month ago

Not needed anymore because the code segment which caused this issue was removed.