Bug 2750 - trigger_heal with negative value generate an error
Status: RESOLVED FIXED
Alias: None
Product: Tremulous
Classification: Unclassified
Component: Misc
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Assignee: Tim Angus
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2006-06-16 19:13 EDT by soubok
Modified: 2006-06-19 04:41:49 EDT
3 users (show)

See Also:


Attachments
don't let trigger_heal have a negative value (462 bytes, patch)
2006-06-17 16:32 EDT, Tony J. White

Description soubok 2006-06-16 19:13:11 EDT
When I use a trigger_heal with a negative heal value and when the player health reach 0, the map break with this message:
  clientSpawn: spawn is null
Comment 1 Tony J. White 2006-06-17 02:12:28 EDT
(In reply to comment #0)
> When I use a trigger_heal with a negative heal value and when the player health
> reach 0, the map break with this message:
>   clientSpawn: spawn is null
> 

Related to bug 2732 ?
Comment 2 Tony J. White 2006-06-17 02:52:33 EDT
(In reply to comment #1)
> Related to bug 2732 ?

Yes, it seems that if a player's death is discovered in ClientThink_real() as opposed to the normal way in G_Damage(), then it calls respawn() on them
immediately instead of calling player_die() and placing them in the respawn
queue.

It seems the proper fix would be to call player_die() from ClientThink_real() instead.  Or at a bare minimum just set the client's pers.classSelection to 
PCL_NONE so that they spawn normally.

There is also a similar respawn() call done at the start of intermission
which I think is probably causing my bug 2732.

This is going to be hard for me to to reproduce/test.  Can you provide the
map that does the negative tigger_hurt so I can test that way?

Comment 3 Tim Angus 2006-06-17 05:21:17 EDT
The fact that trigger_heal even ALLOWS a negative heal value is a bug in itself. If you want to damage clients you should be using a trigger_hurt.
Comment 4 Tony J. White 2006-06-17 16:32:34 EDT
Created attachment 940 [details]
don't let trigger_heal have a negative value

untested, but seems straight forward.
Comment 5 Tim Angus 2006-06-19 04:41:49 EDT
Fixed the negative damage thing. I think we should keep dicussion of the "spawn is NULL" bug to the other bug, though this is perhaps a good way of reproducing it.