Fix AI not moving

harmful chrysalis auto chainsaw
Change player templates file missing log to warning
This commit is contained in:
Cong
2023-12-31 14:48:11 +11:00
parent d596d1d49b
commit cc1b021922
3 changed files with 5 additions and 4 deletions

View File

@@ -24,7 +24,8 @@
"Sound": "",
"SwitchSound": "chainsaw_switch",
"SoundLockLength": 50,
"CanShoot": false
"CanShoot": false,
"Auto": true
},
{
"Pic": "blaster_white",

View File

@@ -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)
{

View File

@@ -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;
}