Changeset View
Changeset View
Standalone View
Standalone View
source/tools/atlas/GameInterface/ActorViewer.cpp
Show First 20 Lines • Show All 389 Lines • ▼ Show 20 Lines | if (anim == "walk") | ||||
speed = 7.f; // typical unit speed | speed = 7.f; // typical unit speed | ||||
m.CurrentSpeed = speed; | m.CurrentSpeed = speed; | ||||
} | } | ||||
else if (anim == "run") | else if (anim == "run") | ||||
{ | { | ||||
CmpPtr<ICmpUnitMotion> cmpUnitMotion(m.Simulation2, m.Entity); | CmpPtr<ICmpUnitMotion> cmpUnitMotion(m.Simulation2, m.Entity); | ||||
if (cmpUnitMotion) | if (cmpUnitMotion) | ||||
speed = cmpUnitMotion->GetWalkSpeed().ToFloat() * cmpUnitMotion->GetRunSpeedMultiplier().ToFloat(); | speed = cmpUnitMotion->GetWalkSpeed().ToFloat() * cmpUnitMotion->GetRunMultiplier().ToFloat(); | ||||
else | else | ||||
speed = 12.f; // typical unit speed | speed = 12.f; // typical unit speed | ||||
m.CurrentSpeed = speed; | m.CurrentSpeed = speed; | ||||
} | } | ||||
else if (anim == "melee") | else if (anim == "melee") | ||||
{ | { | ||||
speed = 1.f; // speed will be ignored if we have a repeattime | speed = 1.f; // speed will be ignored if we have a repeattime | ||||
▲ Show 20 Lines • Show All 151 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator