I want tanks ignore incapacitated survivors just like L4D2. I tried my best working on it but I could not find which netprop is Tank's target stored in.
FAILED TRIES:
This is a list of my failed tries attempting to find TANK'S current target. Some of them returns runtime errors.
Code:
int target = GetEntPropEnt(attacker, Prop_Send, "m_hUseEntity");
int target = GetEntPropEnt(attacker, Prop_Send, "m_hViewEntity");
int target = GetEntPropEnt(attacker, Prop_Send, "m_hConstraintEntity");
int target = GetEntPropEnt(attacker, Prop_Send, "m_hTargetEntity");
int target = GetEntPropEnt(attacker, Prop_Send, "m_fOnTarget");
int target = GetEntPropEnt(attacker, Prop_Send, "m_clientLookatTarget");
int target = GetEntPropEnt(attacker, Prop_Send, "m_survivor");
int target = GetEntPropEnt(attacker, Prop_Send, "m_bAutoAimTarget");
int target = GetEntPropEnt(attacker, Prop_Send, "m_pushEntity");
The only working netprop I've found was:
PHP Code:
int target = GetEntPropEnt(attacker, Prop_Send, "m_lookatPlayer");
But whenever I set it to another value, tank doesn't stop pounding his victim.
Adding a dead flag to victim is not the solution, because I want the incapacitated victim is still a target for hunters, witch and normal zombies.
Besides that, if we set a dead flag to incpacitated victim, sacrifice finale may fail if the incapacitated one is marked as dead (two survivors alive required to complete finale).