[TTT ] Fix radio calling out dead players #1145

merged 5 commits into from Apr 22, 2016


None yet

5 participants

end360 commented Mar 14, 2016

Fixes the radio calling out dead or spectating players.

end360 added some commits Mar 14, 2016
@end360 end360 Fix radio calling out dead people
Radio could call out dead spectators instead of the person you want to call out.
@end360 end360 Fix for calling out dead players
Fixes radio calling out people who are in spectator team/ who are dead.
@robotboy655 robotboy655 added the TTT label Mar 14, 2016

might be neater if lines 261 and 262 were consolidated with

if ent:IsPlayer() and ent:IsTerror() then
end360 commented Mar 15, 2016

@zerfgog I assumed that if the entity Isn't a player then an error would be thrown if you tested if IsTerror() since I believe that works only with players


The second condition is only checked if the first one is true.

EDIT: To be correct not false or nil but yeeaah


You forgot to undo the indention

end360 commented Mar 15, 2016

Thanks for telling me that, I'm a bit distracted by class right now.

@svdm svdm commented on an outdated diff Mar 15, 2016
@@ -258,7 +258,7 @@ function RADIO:GetTargetType()
local ent = trace.Entity
- if ent:IsPlayer() then
+ if ent:IsPlayer()and ent:IsTerror() then
svdm Mar 15, 2016 Collaborator

Good fix and I hate to nitpick, but please make the and have one space on either side.

@svdm svdm merged commit b2e752c into garrynewman:master Apr 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment