Bug 3545 - Some information is lost while evolving
Status: RESOLVED FIXED
Alias: None
Product: Tremulous
Classification: Unclassified
Component: Misc
Version: unspecified
Hardware: PC All
: P3 normal
Assignee: Tim Angus
QA Contact: Tremulous Bugs
URL:
Depends on:
Blocks:
 
Reported: 2008-02-17 19:51 EST by Ben Millwood
Modified: 2009-10-20 14:14:46 EDT
1 user (show)

See Also:


Attachments
keep poison when evolving (958 bytes, patch)
2008-02-17 19:53 EST, Ben Millwood
save and restore ps.velocity (741 bytes, patch)
2008-02-18 10:45 EST, Ben Millwood

Description Ben Millwood 2008-02-17 19:51:22 EST
The calling of ClientSpawn in Cmd_Class_f clears a bunch of stuff in the entity/client structure. This is intentional and commented as such in the code.
However, there are a few things that arguably need to be kept between evolutions.

I'm going to attach a patch that addresses one of these, but there are probably others. I know kevlarman complained about the loss of ps.velocity, so I might do a patch for that too. In fact if I'm really feeling generous, I'll do some kind of general solution (struct savedData; G_SaveClientData; G_RestoreClientData; or some such)
Comment 1 Ben Millwood 2008-02-17 19:53:11 EST
Created attachment 1671 [details]
keep poison when evolving

This patch saves the STAT_BOOSTED state and lastBoostedTime (or whatever it's called) before the evolution and restores them, allowing an alien to keep their poison throughout.

It's somewhat arguable whether this is a feature or a bug. I asked Norfenstein and he said he was unsure.
Comment 2 Ben Millwood 2008-02-18 10:45:05 EST
Created attachment 1680 [details]
save and restore ps.velocity

This patch, which minorly conflicts with the above, stops ent->client->ps.velocity from being cleared when you evolve.
Comment 3 Tim Angus 2009-10-17 19:03:49 EDT
It was originally a feature, as I wanted to make evolving something you had to think about before doing, but it's up to Norf now really.
Comment 4 Chris "Lakitu7" Schwarz 2009-10-20 14:14:46 EDT
The first patch (keep poison) was apparently already in sometime during the merge. Committed the second at r1833.