Bug 3243 - /notarget cheat extended to buildables
Status: RESOLVED FIXED
Alias: None
Product: Tremulous
Classification: Unclassified
Component: Misc
Version: unspecified
Hardware: All All
: P5 enhancement
Assignee: Tremulous Bugs
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2007-06-27 12:01 EDT by Ben Millwood
Modified: 2010-03-31 18:21:29 EDT
1 user (show)

See Also:


Attachments
notarget flag respected by buildables (3.60 KB, patch)
2007-06-27 12:02 EDT, Ben Millwood

Description Ben Millwood 2007-06-27 12:01:56 EDT
Since Tremulous no longer has bots the /notarget command (or rather, the notarget entityflag) in devmap mode is left unused. I've found a use for it by going through g_buildable.c and making many of the targeting functions of buildables ignore clients who have the FL_NOTARGET flag.
Some notes:
Notargeted clients are no longer slowed by creep
Acid tubes seem to take a second or two to stop firing after the command is executed, during which they will continue to hurt you. Furthermore, if an acid tube is already firing due to the presence of another client, it will probably hurt you too.
I've disabled even the positive effects of the medistat and booster (the poison, at least) while notarget is on, but I'm not sure if this is sensible. In devmap mode, one can always /give health or poison anyway.
Hives may in some cases hurt a notargeted client but swarms will return to hive immediately if their target activates notarget.
Comment 1 Ben Millwood 2007-06-27 12:02:58 EDT
Created attachment 1425 [details]
notarget flag respected by buildables
Comment 2 Tim Angus 2007-09-20 10:00:15 EDT
Not sure I really see the use of this. Why is this superior to just enabling god mode? If there is no legitimate use it's just more logic to go wrong.
Comment 3 Ben Millwood 2007-09-20 12:20:47 EDT
God mode does not disable the knockback received from buildable attacks (especially significant with tesla generators) nor the weapon effects (e.g. acid splashing everywhere and eating your FPS).
Neither does it prevent those rare cases where you want the automatic beneficial effects of your own buildables to go away, e.g. when you want to preserve your low health while accessing the armoury.

It's a niche case, but the logic is so simple that I don't see it doing any harm, and there have been occasions in the past where I have felt the need for such a feature.
Comment 4 Chris "Lakitu7" Schwarz 2009-02-26 19:29:53 EST
I think this should go in. I use it all the time while testing and it's not really any less useful than the other cheat commands. /god does not really suffice because of knockback and fps, as ben said, but also beause hearing turrets firing repeatedly for more than 3 seconds is absolutely maddening :). The logic is trivially simple and has been in place on basically every trem server for years now without causing any issues. 
Comment 5 Chris "Lakitu7" Schwarz 2010-03-31 18:21:29 EDT
Updated (mostly rewritten) and applied at r1997 because I'm way tired of seeing this bug open.