Bug 2958 - switching teams results in team kills
Status: RESOLVED FIXED
Alias: None
Product: Tremulous
Classification: Unclassified
Component: Misc
Version: unspecified
Hardware: PC Linux
: P2 minor
Assignee: Tremulous Bugs
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2006-12-14 21:44 EST by M. Kristall
Modified: 2007-04-27 00:20:08 EDT
0 users

See Also:


Attachments
do stuff when leaving your current team (4.25 KB, patch)
2007-01-02 13:40 EST, M. Kristall
still mostly untested, but at least the line numbers should be right :) (4.22 KB, patch)
2007-01-02 22:36 EST, M. Kristall
skip if spectating (4.24 KB, patch)
2007-02-05 18:42 EST, M. Kristall

Description M. Kristall 2006-12-14 21:44:15 EST
Determining if a kill was a team kill is done at te time of death and not the time that the killer intended to kill. For example, if a human drops a grenade in the alien base and switches to the aliens, all aliens killed with that grenade are counted as team kills, even though it was a human who dropped it. Similarly, dropping a grenade in the human base and switching to the alien team can result in a higher score and kills towards the next stage.

Norfenstein: the grenade should just disappear when you leave the team

Grenades and slow projectiles should disappear, and acid and gas attacks should be cured when the player switches teams. (As a side effect, accidentally dropping a grenade in the human base could be rendered harmless by leaving the humans.)
Comment 1 M. Kristall 2007-01-02 13:40:12 EST
Created attachment 1235 [details]
do stuff when leaving your current team

When a player switches teams or disconnects, get rid of their projectiles and un-poison all clients they last poisoned.

I wasn't able to test the poison stuff and I'm tired, so it's probably got some really stupid and blatantly obvious bugs. I also might have screwed up with the line numbers in the patch :-(
Comment 2 M. Kristall 2007-01-02 13:41:18 EST
yep, I screwed up with the line numbers
Comment 3 M. Kristall 2007-01-02 22:36:31 EST
Created attachment 1236 [details]
still mostly untested, but at least the line numbers should be right :)
Comment 4 M. Kristall 2007-02-05 18:42:51 EST
Created attachment 1251 [details]
skip if spectating

The only difference between this and attachment 1236 [details] is a spectator case which assumes that spectators haven't been throwing grenades or poisoning people.

It seems to work as expected.
Comment 5 Tony J. White 2007-04-27 00:20:08 EDT
(In reply to comment #4)
> Created an attachment (id=1251) [details]
> skip if spectating
> 
> The only difference between this and attachment 1236 [details] is a spectator case which
> assumes that spectators haven't been throwing grenades or poisoning people.
> 
> It seems to work as expected.
> 

Updated to work with the /ignore stuff from svn 925 and committed at revision 939.  Thanks.