Bug 5053 - Grenades always placed at the same orientation
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: GIT MASTER
Hardware: All All
: P3 normal
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2011-06-21 12:19 EDT by Eugene C.
Modified: 2011-06-24 09:15:50 EDT
2 users (show)

See Also:


Attachments
Fix (448 bytes, patch)
2011-06-21 12:19 EDT, Eugene C.

Description Eugene C. 2011-06-21 12:19:15 EDT
Created attachment 2793 [details]
Fix

Grenades always placed at the same orientation after bouncing
Comment 1 Thilo Schulz 2011-06-21 16:13:26 EDT
Is the time value supposed to be some kind of randomness? How does it fix it exactly?
Comment 2 Eugene C. 2011-06-21 17:53:35 EDT
When bouncing/rotating (non-stationary state) - level.time is passed to ent->s.time and RotateAroundDirection( ent.axis, cg.time / 4 ) is used
While at stationary RotateAroundDirection( ent.axis, s1->time ) is used - so level.time/4 sould be passed to ent->s.time store last visible orientation

Of course you can pass any random value to ent->s.time but then it will look like some unexpected jerky rotation at landing - while storing last visible orientation will give much more natural(-expected) behavior
Comment 3 Zack Middleton 2011-06-21 18:31:28 EDT
Checking if classname is grenade seems unnecessary. Grenade is the only q3a/missionpack missile with EF_BOUNCE_HALF (so only one that will run that code), but if there were others they should probably do it too.
Comment 4 Thilo Schulz 2011-06-22 19:12:43 EDT
Eugene: Thanks alot for your explanation.
Can I have your opinion on Zack's message please? Filtering for text literals seems a bit hackish to me.
Comment 5 Eugene C. 2011-06-23 02:45:25 EDT
>Can I have your opinion on Zack's message please?

Looks reasonable
Comment 6 Thilo Schulz 2011-06-24 09:15:50 EDT
applied r2056 without the classname check. Thanks :)