int LuaSyncedMoveCtrl::SetVelocity(lua_State* L) { CScriptMoveType* moveType = ParseMoveType(L, __FUNCTION__, 1); if (moveType == NULL) { return 0; } const float3 vel((float)luaL_checknumber(L, 2), (float)luaL_checknumber(L, 3), (float)luaL_checknumber(L, 4)); moveType->SetVelocity(vel); return 0; }
int LuaSyncedMoveCtrl::SetVelocity(lua_State* L) { CScriptMoveType* moveType = ParseScriptMoveType(L, __FUNCTION__, 1); if (moveType == NULL) return 0; const float3 vel(luaL_checkfloat(L, 2), luaL_checkfloat(L, 3), luaL_checkfloat(L, 4)); ASSERT_SYNCED(vel); moveType->SetVelocity(vel); return 0; }