Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show Squad Car in the wreck gallery #235

Merged
merged 1 commit into from
Nov 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/DETHRACE/common/loading.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#define HITHER_MULTIPLIER 2.0f
#define AMBIENT_MULTIPLIER 0.01f
#define NBR_FUNK_GROVE_FLAGS 30
#define OPPONENT_APC_IDX 3

tHeadup_info gHeadup_image_info[32] = {
// Modified by DethRace to fit the "demo timeout" fancy head-up.
Expand Down Expand Up @@ -1687,7 +1688,11 @@ void SetModelFlags(br_model* pModel, int pOwner) {
LOG_TRACE("(%p, %d)", pModel, pOwner);

if (pModel && pModel->nfaces) {
if (pOwner == eDriver_net_human || gAusterity_mode) {
#if defined(DETHRACE_FIX_BUGS) /* Show Squad Car in the wreck gallery. */
if (gAusterity_mode) {
#else
if (pOwner == OPPONENT_APC_IDX || gAusterity_mode) {
#endif
if ((pModel->flags & BR_MODF_UPDATEABLE) != 0) {
pModel->flags &= ~(BR_MODF_KEEP_ORIGINAL | BR_MODF_UPDATEABLE);
BrModelUpdate(pModel, BR_MODU_ALL);
Expand Down Expand Up @@ -2227,8 +2232,7 @@ void LoadCar(char* pCar_name, tDriver pDriver, tCar_spec* pCar_spec, int pOwner,
AddGroovidelics(f, pOwner, pCar_spec->car_master_actor, gGroove_funk_offset, 1);
for (i = 0; i < pCar_spec->car_actor_count; i++) {
PossibleService();
// Jeff: Bug? pOwner will never be 3. Probably this was supposed to be "pDriver == eDriver_net_human"?
if (pOwner == 3 || gAusterity_mode) {
if (pOwner == OPPONENT_APC_IDX || gAusterity_mode) {
pCar_spec->car_model_actors[i].crush_data.softness_factor = SkipCrushData(f);
pCar_spec->car_model_actors[i].crush_data.crush_points = NULL;
pCar_spec->car_model_actors[i].crush_data.number_of_crush_points = 0;
Expand Down