fix: dead/powered down barricade is not predicted#3136
fix: dead/powered down barricade is not predicted#3136cu-kai merged 1 commit intoUnvanquished:masterfrom
Conversation
| { | ||
| BG_BuildableBoundingBox( ent->modelindex, bmins, bmaxs ); | ||
| if ( ent->modelindex == BA_A_BARRICADE && ent->torsoAnim == BANIM_IDLE_UNPOWERED ) | ||
| if ( ent->modelindex == BA_A_BARRICADE && ( ent->torsoAnim != BANIM_IDLE1 || !( ent->eFlags & EF_B_SPAWNED ) ) ) |
There was a problem hiding this comment.
Looking closer at my original fix, I wonder if we could just do ent->legsAnim == BANIM_POWERDOWN as the condition and catch everything...
There was a problem hiding this comment.
Seems to work ok in my tests?
There was a problem hiding this comment.
eh, it's meh. I think add a note here saying // TODO: This is not perfect and can be improved.
|
In retrospect, maybe it was a bad idea to make cgame compute buildable bounds from their config files. IIRC I did this because of incorrect prediction with some buildables that had non-integral heights. The prediction was wrong because it used bounding box info sent from the surface which was rounded to integers. But we could just change the bounds to be integers instead. Maybe sending the stuff from the server is a good tradeoff in favor of simplicity (against not allowing non-integer bounds and sending more data on the network). |
|
Ok, before doing some extensive redesign, I think it's fair to say this improves the situation. Perhaps it is fine to submit as is to improve the situation and then we can implement the full design after? |
|
I'm not demanding the use of any specific approach. But if anyone is interested in trying the old version with bboxes calculated by the server, they can revert 7f00ec8. |
|
LGTM |
d858fdc to
4268e23
Compare
take 2