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_fIdealAccel = 35;
|
||||
m_fIdealSpeed = 250;
|
||||
m_fMaxSpeed = 250;
|
||||
m_fMaxSpeed = 250; // Added in 2.30
|
||||
|
||||
switch (ev->NumArgs()) {
|
||||
case 6:
|
||||
|
@ -3388,6 +3388,7 @@ void Vehicle::EventDriveInternal(Event *ev, bool wait)
|
|||
m_fIdealAccel = ev->GetFloat(3);
|
||||
case 2:
|
||||
m_fIdealSpeed = ev->GetFloat(2);
|
||||
m_fMaxSpeed = m_fIdealSpeed;// Added in 2.30
|
||||
case 1:
|
||||
path = ev->GetSimpleEntity(1);
|
||||
if (!path) {
|
||||
|
@ -4088,8 +4089,8 @@ void Vehicle::SlidePush(Vector vPush)
|
|||
if (j == i && other->entity) {
|
||||
other->entity->CheckGround();
|
||||
|
||||
if (other->entity->groundentity
|
||||
&& (other->entity->groundentity == edict || other->entity == m_pCollisionEntity)) {
|
||||
if (other->entity->groundentity) {
|
||||
if (other->entity->groundentity == edict || m_pCollisionEntity && other->entity->groundentity->entity == m_pCollisionEntity) {
|
||||
// save the entity
|
||||
pSkippedEntities[iNumSkipped] = other->entity;
|
||||
iContentsEntities[iNumSkipped] = other->r.contents;
|
||||
|
@ -4104,6 +4105,7 @@ void Vehicle::SlidePush(Vector vPush)
|
|||
other->entity->setSolidType(SOLID_NOT);
|
||||
iNumSkippedEntities++;
|
||||
}
|
||||
}
|
||||
|
||||
if (g_showvehiclemovedebug->integer) {
|
||||
Com_Printf(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue