mirror of
https://github.com/cxong/cdogs-sdl.git
synced 2025-07-22 23:13:00 +02:00
Fix AI not moving
harmful chrysalis auto chainsaw Change player templates file missing log to warning
This commit is contained in:
@@ -24,7 +24,8 @@
|
||||
"Sound": "",
|
||||
"SwitchSound": "chainsaw_switch",
|
||||
"SoundLockLength": 50,
|
||||
"CanShoot": false
|
||||
"CanShoot": false,
|
||||
"Auto": true
|
||||
},
|
||||
{
|
||||
"Pic": "blaster_white",
|
||||
|
@@ -1130,13 +1130,13 @@ static bool ActorTryMove(TActor *actor, int cmd, int ticks)
|
||||
actor->PlayerUID < 0 ? (actor->flags & FLAGS_MOVE_AND_SHOOT) :
|
||||
(
|
||||
ConfigGetEnum(&gConfig, "Game.FireMoveStyle") != FIREMOVE_STOP ||
|
||||
!actor->hasShot ||
|
||||
(ConfigGetEnum(&gConfig, "Game.SwitchMoveStyle") ==
|
||||
SWITCHMOVE_STRAFE &&
|
||||
Button2(cmd))
|
||||
);
|
||||
const bool canMove = !actor->hasShot || canMoveWhenShooting;
|
||||
const bool willMove =
|
||||
!actor->petrified && CMD_HAS_DIRECTION(cmd) && canMoveWhenShooting;
|
||||
!actor->petrified && CMD_HAS_DIRECTION(cmd) && canMove;
|
||||
actor->MoveVel = svec2_zero();
|
||||
if (willMove)
|
||||
{
|
||||
|
@@ -125,7 +125,7 @@ void PlayerTemplatesLoad(PlayerTemplates *pt, const CharacterClasses *classes)
|
||||
FILE *f = fopen(GetConfigFilePath(PLAYER_TEMPLATE_FILE), "r");
|
||||
if (!f)
|
||||
{
|
||||
LOG(LM_MAIN, LL_ERROR, "loading player templates '%s'",
|
||||
LOG(LM_MAIN, LL_WARN, "player templates file missing '%s'",
|
||||
PLAYER_TEMPLATE_FILE);
|
||||
goto bail;
|
||||
}
|
||||
|
Reference in New Issue
Block a user