MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / CreatureTilt

Function CreatureTilt

TombEngine/Game/control/box.cpp:1257–1271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1255}
1256
1257void CreatureTilt(ItemInfo* item, short angle)
1258{
1259 angle = (angle << 2) - item->Pose.Orientation.z;
1260
1261 if (angle < -ANGLE(3.0f))
1262 angle = -ANGLE(3.0f);
1263 else if (angle > ANGLE(3.0f))
1264 angle = ANGLE(3.0f);
1265
1266 short absRot = abs(item->Pose.Orientation.z);
1267 if (absRot < ANGLE(15.0f) || absRot > ANGLE(30.0f))
1268 angle >>= 1;
1269
1270 item->Pose.Orientation.z += angle;
1271}
1272
1273short CreatureTurn(ItemInfo* item, short maxTurn)
1274{

Callers 15

SilencerControlFunction · 0.85
MonkControlFunction · 0.85
WorkerMachineGunControlFunction · 0.85
KnifeThrowerControlFunction · 0.85
WorkerShotgunControlFunction · 0.85
WorkerFlamethrowerFunction · 0.85
YetiControlFunction · 0.85
WorkerDualGunControlFunction · 0.85
MercenaryUziControlFunction · 0.85
MPGunControlFunction · 0.85
CivvyControlFunction · 0.85

Calls 1

ANGLEFunction · 0.85

Tested by

no test coverage detected