You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rework damage handling to eliminate the use of global variables and fix bugs.
Pass parameters to TakeDamage using a structure containing relevant information.
This structure can also be used to pass information to TraceAttack and Killed.
g_vecAttackDir is set in TakeDamage but is used in TraceAttack which is called before TakeDamage.
Pass the correct attacker in func_tank entities. Note that the Gene Worm expects the attacker to be the tank itself (inflictor), not the attacker so that logic needs changing to function correctly.
There may be other entities that expect the attacker to actually be in the inflictor so this needs extensive testing.
Redesigning the multi-damage functionality to store its results in a structure based to TraceAttack can help eliminate edge cases resulting for leftover global state.
The text was updated successfully, but these errors were encountered:
Rework damage handling to eliminate the use of global variables and fix bugs.
Pass parameters to
TakeDamage
using a structure containing relevant information.This structure can also be used to pass information to
TraceAttack
andKilled
.g_vecAttackDir
is set inTakeDamage
but is used inTraceAttack
which is called beforeTakeDamage
.Pass the correct attacker in
func_tank
entities. Note that the Gene Worm expects the attacker to be the tank itself (inflictor), not the attacker so that logic needs changing to function correctly.There may be other entities that expect the attacker to actually be in the inflictor so this needs extensive testing.
Redesigning the multi-damage functionality to store its results in a structure based to
TraceAttack
can help eliminate edge cases resulting for leftover global state.The text was updated successfully, but these errors were encountered: