Code clarity

This commit is contained in:
smallmodel 2024-03-03 22:47:31 +01:00
parent 2e32395cf2
commit 63456beeb0
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -3465,22 +3465,23 @@ void Vehicle::SetupPath(cVehicleSpline *pPath, SimpleEntity *se)
Vector vDelta = vLastOrigin - ent->origin; Vector vDelta = vLastOrigin - ent->origin;
float vTmp[4]; float vTmp[4];
if (vDelta.length() == 0.0f && i > 1) { if (vDelta.length() == 0 && i > 1) {
Com_Printf("^~^~^Warning: Vehicle Driving with a Path that contains 2 equal points\n"); Com_Printf("^~^~^Warning: Vehicle Driving with a Path that contains 2 equal points\n");
} else { continue;
}
fCurLength += vDelta.length(); fCurLength += vDelta.length();
vTmp[0] = fCurLength; vTmp[0] = fCurLength;
VectorCopy(ent->origin, vTmp + 1); VectorCopy(ent->origin, vTmp + 1);
if (ent->IsSubclassOfVehiclePoint()) { if (ent->IsSubclassOfVehiclePoint()) {
pPath->Add(vTmp, static_cast<VehiclePoint *>(ent)->spawnflags); pPath->Add(vTmp, static_cast<VehiclePoint*>(ent)->spawnflags);
} else { } else {
pPath->Add(vTmp, 0); pPath->Add(vTmp, 0);
} }
vLastOrigin = ent->origin; vLastOrigin = ent->origin;
}
if (ent == se && i > 1) { if (ent == se && i > 1) {
break; break;