Subversion Repositories Games.Carmageddon

Rev

Rev 20 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20 Rev 21
Line 1425... Line 1425...
1425
    if (ControlCar[gControl__car] == 0) {
1425
    if (ControlCar[gControl__car] == 0) {
1426
        gControl__car = 0;
1426
        gControl__car = 0;
1427
    }
1427
    }
1428
    switch (gControl__car) {
1428
    switch (gControl__car) {
1429
    case 0:
1429
    case 0:
1430
        NewTextHeadupSlot(4, 0, 500, -1, "Original Controls");
1430
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "Original Controls");
1431
        break;
1431
        break;
1432
    case 1:
1432
    case 1:
1433
        NewTextHeadupSlot(4, 0, 500, -1, "Accelerated steering");
1433
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "Accelerated steering");
1434
        break;
1434
        break;
1435
    case 2:
1435
    case 2:
1436
        NewTextHeadupSlot(4, 0, 500, -1, "0.75 Accelerated");
1436
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "0.75 Accelerated");
1437
        break;
1437
        break;
1438
    case 3:
1438
    case 3:
1439
        NewTextHeadupSlot(4, 0, 500, -1, "0.5 Accelerated");
1439
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "0.5 Accelerated");
1440
        break;
1440
        break;
1441
    default:
1441
    default:
1442
        NewTextHeadupSlot(4, 0, 500, -1, "New controls");
1442
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, "New controls");
1443
        break;
1443
        break;
1444
    }
1444
    }
1445
}
1445
}
1446
 
1446
 
1447
// IDA: void __usercall ControlCar2(tCar_spec *c@<EAX>, br_scalar dt)
1447
// IDA: void __usercall ControlCar2(tCar_spec *c@<EAX>, br_scalar dt)
Line 3262... Line 3262...
3262
    }
3262
    }
3263
    *(br_vector3*)&c->oldmat.m[3][0] = old_pos;
3263
    *(br_vector3*)&c->oldmat.m[3][0] = old_pos;
3264
    c->bounds[1].min.v[2] = min_z;
3264
    c->bounds[1].min.v[2] = min_z;
3265
    c->bounds[1].max.v[2] = max_z;
3265
    c->bounds[1].max.v[2] = max_z;
3266
    if (c->driver == eDriver_local_human) {
3266
    if (c->driver == eDriver_local_human) {
3267
        NewTextHeadupSlot(4, 0, 1000, -4, GetMiscString(kMiscString_RepairObstructed));
3267
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 1000, -4, GetMiscString(kMiscString_RepairObstructed));
3268
    }
3268
    }
3269
    return 0;
3269
    return 0;
3270
}
3270
}
3271
 
3271
 
3272
// IDA: void __usercall CrushBoundingBox(tCar_spec *c@<EAX>, int crush_only@<EDX>)
3272
// IDA: void __usercall CrushBoundingBox(tCar_spec *c@<EAX>, int crush_only@<EDX>)
Line 4378... Line 4378...
4378
    if (gNet_mode != eNet_mode_none) {
4378
    if (gNet_mode != eNet_mode_none) {
4379
        if (n >= gNumber_of_net_players) {
4379
        if (n >= gNumber_of_net_players) {
4380
            n = 0;
4380
            n = 0;
4381
        }
4381
        }
4382
        gCar_to_view = gNet_players[n].car;
4382
        gCar_to_view = gNet_players[n].car;
4383
        NewTextHeadupSlot(4, 0, 2000, -3, gNet_players[n].player_name);
4383
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -3, gNet_players[n].player_name);
4384
    } else {
4384
    } else {
4385
        if (n >= gNum_viewable_cars) {
4385
        if (n >= gNum_viewable_cars) {
4386
            n = 0;
4386
            n = 0;
4387
        }
4387
        }
4388
        gCar_to_view = gViewable_car_list[n];
4388
        gCar_to_view = gViewable_car_list[n];
4389
        NewTextHeadupSlot(4, 0, 2000, -3, gViewable_car_list[n]->driver_name);
4389
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 2000, -3, gViewable_car_list[n]->driver_name);
4390
    }
4390
    }
4391
    gCamera_yaw = 0;
4391
    gCamera_yaw = 0;
4392
    InitialiseExternalCamera();
4392
    InitialiseExternalCamera();
4393
    PositionExternalCamera(gCar_to_view, 200);
4393
    PositionExternalCamera(gCar_to_view, 200);
4394
}
4394
}
Line 4397... Line 4397...
4397
void ToggleCarToCarCollisions(void) {
4397
void ToggleCarToCarCollisions(void) {
4398
    LOG_TRACE("()");
4398
    LOG_TRACE("()");
4399
 
4399
 
4400
    gCar_car_collisions = !gCar_car_collisions;
4400
    gCar_car_collisions = !gCar_car_collisions;
4401
    if (gCar_car_collisions) {
4401
    if (gCar_car_collisions) {
4402
        NewTextHeadupSlot(4, 0, 3000, -4, "Car Car Collisions");
4402
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, "Car Car Collisions");
4403
    } else {
4403
    } else {
4404
        NewTextHeadupSlot(4, 0, 3000, -4, "Ghost Cars");
4404
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, "Ghost Cars");
4405
    }
4405
    }
4406
}
4406
}
4407
 
4407
 
4408
// IDA: void __cdecl SwapCar()
4408
// IDA: void __cdecl SwapCar()
4409
void SwapCar(void) {
4409
void SwapCar(void) {
Line 4423... Line 4423...
4423
    }
4423
    }
4424
    if (c->down_force_speed > 300.f) {
4424
    if (c->down_force_speed > 300.f) {
4425
        c->down_force_speed = 2000.0;
4425
        c->down_force_speed = 2000.0;
4426
    }
4426
    }
4427
    sprintf(s, "DownForceSpeed %f", c->down_force_speed);
4427
    sprintf(s, "DownForceSpeed %f", c->down_force_speed);
4428
    NewTextHeadupSlot(4, 0, 1500, -4, s);
4428
    NewTextHeadupSlot(eHeadupSlot_misc, 0, 1500, -4, s);
4429
}
4429
}
4430
 
4430
 
4431
// IDA: void __cdecl FreezeMechanics()
4431
// IDA: void __cdecl FreezeMechanics()
4432
void FreezeMechanics(void) {
4432
void FreezeMechanics(void) {
4433
    LOG_TRACE("()");
4433
    LOG_TRACE("()");
4434
 
4434
 
4435
    gFreeze_mechanics = !gFreeze_mechanics;
4435
    gFreeze_mechanics = !gFreeze_mechanics;
4436
    if (gFreeze_mechanics) {
4436
    if (gFreeze_mechanics) {
4437
        NewTextHeadupSlot(4, 0, 3000, -4, "Mechanics Frozen");
4437
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, "Mechanics Frozen");
4438
    } else {
4438
    } else {
4439
        NewTextHeadupSlot(4, 0, 3000, -4, "Thawed Mechanics");
4439
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, "Thawed Mechanics");
4440
    }
4440
    }
4441
}
4441
}
4442
 
4442
 
4443
// IDA: void __cdecl PutOpponentsInNeutral()
4443
// IDA: void __cdecl PutOpponentsInNeutral()
4444
void PutOpponentsInNeutral(void) {
4444
void PutOpponentsInNeutral(void) {
4445
    LOG_TRACE("()");
4445
    LOG_TRACE("()");
4446
 
4446
 
4447
    gStop_opponents_moving = !gStop_opponents_moving;
4447
    gStop_opponents_moving = !gStop_opponents_moving;
4448
    if (gStop_opponents_moving == 0) {
4448
    if (gStop_opponents_moving == 0) {
4449
        NewTextHeadupSlot(4, 0, 3000, -4, "Opponents in neutral");
4449
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, "Opponents in neutral");
4450
    } else {
4450
    } else {
4451
        NewTextHeadupSlot(4, 0, 3000, -4, "Back in gear");
4451
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, "Back in gear");
4452
    }
4452
    }
4453
}
4453
}
4454
 
4454
 
4455
// IDA: void __cdecl SetPanningFieldOfView()
4455
// IDA: void __cdecl SetPanningFieldOfView()
4456
void SetPanningFieldOfView(void) {
4456
void SetPanningFieldOfView(void) {