mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-05-08 11:38:01 +03:00
Fixed m_fMaxSpeed being always set to 250
This commit is contained in:
parent
a770df1e0b
commit
5521cf9ab3
1 changed files with 16 additions and 14 deletions
|
@ -3375,7 +3375,7 @@ void Vehicle::EventDriveInternal(Event *ev, bool wait)
|
||||||
m_fLookAhead = 256;
|
m_fLookAhead = 256;
|
||||||
m_fIdealAccel = 35;
|
m_fIdealAccel = 35;
|
||||||
m_fIdealSpeed = 250;
|
m_fIdealSpeed = 250;
|
||||||
m_fMaxSpeed = 250;
|
m_fMaxSpeed = 250; // Added in 2.30
|
||||||
|
|
||||||
switch (ev->NumArgs()) {
|
switch (ev->NumArgs()) {
|
||||||
case 6:
|
case 6:
|
||||||
|
@ -3388,6 +3388,7 @@ void Vehicle::EventDriveInternal(Event *ev, bool wait)
|
||||||
m_fIdealAccel = ev->GetFloat(3);
|
m_fIdealAccel = ev->GetFloat(3);
|
||||||
case 2:
|
case 2:
|
||||||
m_fIdealSpeed = ev->GetFloat(2);
|
m_fIdealSpeed = ev->GetFloat(2);
|
||||||
|
m_fMaxSpeed = m_fIdealSpeed;// Added in 2.30
|
||||||
case 1:
|
case 1:
|
||||||
path = ev->GetSimpleEntity(1);
|
path = ev->GetSimpleEntity(1);
|
||||||
if (!path) {
|
if (!path) {
|
||||||
|
@ -4088,21 +4089,22 @@ void Vehicle::SlidePush(Vector vPush)
|
||||||
if (j == i && other->entity) {
|
if (j == i && other->entity) {
|
||||||
other->entity->CheckGround();
|
other->entity->CheckGround();
|
||||||
|
|
||||||
if (other->entity->groundentity
|
if (other->entity->groundentity) {
|
||||||
&& (other->entity->groundentity == edict || other->entity == m_pCollisionEntity)) {
|
if (other->entity->groundentity == edict || m_pCollisionEntity && other->entity->groundentity->entity == m_pCollisionEntity) {
|
||||||
// save the entity
|
// save the entity
|
||||||
pSkippedEntities[iNumSkipped] = other->entity;
|
pSkippedEntities[iNumSkipped] = other->entity;
|
||||||
iContentsEntities[iNumSkipped] = other->r.contents;
|
iContentsEntities[iNumSkipped] = other->r.contents;
|
||||||
solidEntities[iNumSkipped] = other->solid;
|
solidEntities[iNumSkipped] = other->solid;
|
||||||
iNumSkipped++;
|
iNumSkipped++;
|
||||||
|
|
||||||
if (iNumSkipped >= MAX_SKIPPED_ENTITIES) {
|
if (iNumSkipped >= MAX_SKIPPED_ENTITIES) {
|
||||||
gi.Error(ERR_DROP, "MAX_SKIPPED_ENTITIES hit in VehicleMove.\n");
|
gi.Error(ERR_DROP, "MAX_SKIPPED_ENTITIES hit in VehicleMove.\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
other->entity->setSolidType(SOLID_NOT);
|
||||||
|
iNumSkippedEntities++;
|
||||||
}
|
}
|
||||||
|
|
||||||
other->entity->setSolidType(SOLID_NOT);
|
|
||||||
iNumSkippedEntities++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_showvehiclemovedebug->integer) {
|
if (g_showvehiclemovedebug->integer) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue