Subversion Repositories Games.Carmageddon

Rev

Rev 11 | Rev 18 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11 Rev 15
Line 27... Line 27...
27
 
27
 
28
float gWobble_spam_y[8] = { 0.0f, -0.15f, 0.4f, 0.15f, -0.4f, 0.25f, 0.0f, -0.25f };
28
float gWobble_spam_y[8] = { 0.0f, -0.15f, 0.4f, 0.15f, -0.4f, 0.25f, 0.0f, -0.25f };
29
float gWobble_spam_z[8] = { 0.4f, -0.25f, 0.0f, 0.25f, 0.0f, 0.15f, -0.4f, -0.15f };
29
float gWobble_spam_z[8] = { 0.4f, -0.25f, 0.0f, 0.25f, 0.0f, 0.15f, -0.4f, -0.15f };
30
br_scalar gWheel_circ_to_width = 0.16f;
30
br_scalar gWheel_circ_to_width = 0.16f;
31
tU8 gSmoke_damage_step[12] = { 20u, 20u, 0u, 10u, 10u, 10u, 10u, 10u, 10u, 10u, 10u, 10u };
31
tU8 gSmoke_damage_step[12] = { 20u, 20u, 0u, 10u, 10u, 10u, 10u, 10u, 10u, 10u, 10u, 10u };
32
int gSteal_ranks[6] = { 0, 89, 72, 55, 38, 21 };
32
int gSteal_ranks[5] = { 89, 72, 55, 38, 21 };
-
 
33
 
-
 
34
#define BIGAPC_OPPONENT_INDEX 4
33
 
35
 
34
// IDA: int __usercall ReadCrushData@<EAX>(FILE *pF@<EAX>, tCrush_data *pCrush_data@<EDX>)
36
// IDA: int __usercall ReadCrushData@<EAX>(FILE *pF@<EAX>, tCrush_data *pCrush_data@<EDX>)
35
int ReadCrushData(FILE* pF, tCrush_data* pCrush_data) {
37
int ReadCrushData(FILE* pF, tCrush_data* pCrush_data) {
36
    //char s[256]; // Pierre-Marie Baty -- unused variable
38
    //char s[256]; // Pierre-Marie Baty -- unused variable
37
    //char* str; // Pierre-Marie Baty -- unused variable
39
    //char* str; // Pierre-Marie Baty -- unused variable
Line 482... Line 484...
482
                }
484
                }
483
                memcpy(the_car_actor->actor->model->vertices,
485
                memcpy(the_car_actor->actor->model->vertices,
484
                    the_car_actor->undamaged_vertices,
486
                    the_car_actor->undamaged_vertices,
485
                    the_car_actor->actor->model->nvertices * sizeof(br_vertex));
487
                    the_car_actor->actor->model->nvertices * sizeof(br_vertex));
486
                // FIXME: BrModelUpdate(..., BR_MODU_VERTEX_COLOURS | BR_MODU_VERTEX_POSITIONS) fails on TELL_ME_IF_WE_PASS_THIS_WAY
488
                // FIXME: BrModelUpdate(..., BR_MODU_VERTEX_COLOURS | BR_MODU_VERTEX_POSITIONS) fails on TELL_ME_IF_WE_PASS_THIS_WAY
487
                //BrModelUpdate(the_car_actor->actor->model, BR_MODU_VERTEX_COLOURS | BR_MODU_VERTEX_POSITIONS);
489
                // BrModelUpdate(the_car_actor->actor->model, BR_MODU_VERTEX_COLOURS | BR_MODU_VERTEX_POSITIONS);
488
                BrModelUpdate(the_car_actor->actor->model, BR_MODU_ALL);
490
                BrModelUpdate(the_car_actor->actor->model, BR_MODU_ALL);
489
                if (pipe_vertex_count != 0 && IsActionReplayAvailable()) {
491
                if (pipe_vertex_count != 0 && IsActionReplayAvailable()) {
490
                    PipeSingleModelGeometry(pCar->car_ID, j, pipe_vertex_count, pipe_array);
492
                    PipeSingleModelGeometry(pCar->car_ID, j, pipe_vertex_count, pipe_array);
491
                }
493
                }
492
            }
494
            }
Line 1156... Line 1158...
1156
                    DoFancyHeadup(11);
1158
                    DoFancyHeadup(11);
1157
                    credits_squared = sqr(0.7f / victim->car_model_actors[victim->principal_car_actor].crush_data.softness_factor) * gWasted_creds[gProgram_state.skill_level] + 50.0f;
1159
                    credits_squared = sqr(0.7f / victim->car_model_actors[victim->principal_car_actor].crush_data.softness_factor) * gWasted_creds[gProgram_state.skill_level] + 50.0f;
1158
                    credits = 100 * (int)(credits_squared / 100.0);
1160
                    credits = 100 * (int)(credits_squared / 100.0);
1159
                    AwardTime(gWasted_time[gProgram_state.skill_level]);
1161
                    AwardTime(gWasted_time[gProgram_state.skill_level]);
1160
                    EarnCredits(credits);
1162
                    EarnCredits(credits);
-
 
1163
                    if (victim->can_be_stolen && !gOpponents[victim->index].dead
-
 
1164
                        // strength_rating is between 1 and 5
1161
                    if (victim->can_be_stolen && !gOpponents[victim->index].dead && ((PercentageChance(50) && gSteal_ranks[gOpponents[victim->index].strength_rating] >= gProgram_state.rank) || victim->index == 4)) {
1165
                        && ((PercentageChance(50) && gProgram_state.rank <= gSteal_ranks[gOpponents[victim->index].strength_rating - 1]) || victim->index == BIGAPC_OPPONENT_INDEX)) {
1162
                        StealCar(victim);
1166
                        StealCar(victim);
1163
                    }
1167
                    }
1164
                }
1168
                }
1165
            }
1169
            }
1166
            victim->time_last_hit = the_time;
1170
            victim->time_last_hit = the_time;