Skip to Content
The Alchemy Project

src/scene/shared/vault_range.c

Vault, before and after the thieves are caught: villagers who walk about stop when someone is close in front of them.

Included by vault.c and vault_revisit.c.

Functions

NameDescription
Sint32scVaultStopIfFacingNear (ACTOR *actor, ACTOR *target, Sint32 range, Sint32 force)Stops the actor (paused, standing) when the target is nearer than range pixels and lies ahead of it, within a sixteenth of a turn either side of its heading; force stops it regardless.

Description

Vault, before and after the thieves are caught: villagers who walk about stop when someone is close in front of them.

Functions in detail

scVaultStopIfFacingNear

Sint32 scVaultStopIfFacingNear(ACTOR *actor, ACTOR *target, Sint32 range, Sint32 force)

Stops the actor (paused, standing) when the target is nearer than range pixels and lies ahead of it, within a sixteenth of a turn either side of its heading; force stops it regardless. Returns 1 when it stopped. A target out of range sets it walking again.

References fdActorSelectAnimation(), Sint32 and syAtan().

Referenced by scVaultUpdateWalkingVillager() and scVaultUpdateWomanWantingRoofFixed().

Definition at line 8 of file vault_range.c.