Added 'wep' field to all was_pushed tables. #1114

merged 1 commit into from Jan 18, 2016


None yet

3 participants


TTT currently tracks if a player was pushed with a pushing weapon (Newton Launcher, Discombobulator, crowbar alternate fire), but does not track which weapon was used. This simple change to all of the push weapons' was_pushed tables adds the "wep" field, which stores the weapon's class name, allowing for easy tracking. Useful for stats and damage log addons.

Discombobulators, unfortunately, did not have a good way to pull its class name programmatically where its was_pushed table is generated. Therefore, a string literal is used instead for it.

@robotboy655 robotboy655 added the TTT label Jan 16, 2016
@svdm svdm and 1 other commented on an outdated diff Jan 17, 2016
@@ -39,7 +39,7 @@ local function PushPullRadius(pos, pusher)
- target.was_pushed = {att=pusher, t=CurTime()}
+ target.was_pushed = {att=pusher, t=CurTime(), wep="ttt_weapon_confgrenade"}
svdm Jan 17, 2016 Collaborator

Looks like this should be weapon_ttt_confgrenade

DarkRedemption Jan 17, 2016 Contributor

That's what I get for retyping the change instead of copying it. I'll fix it momentarily.

DarkRedemption Jan 17, 2016 Contributor

Fixed and rebased. Thanks for pointing that out.

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