Skip to content

p_enemy: A_VileTarget reproduces vanilla Doom bug passing x for y argument #132

Open

Description

@sunsided

Context

A_VileTarget in room/src/doom/p_enemy.rs spawns the Archvile's fire object.

Behavior

The Rust port faithfully reproduces a vanilla Doom bug from p_enemy.c: actor->target->x is passed as the Y argument to P_SpawnMobj instead of actor->target->y:

let fog: *mut mobj_t = P_SpawnMobj(
    (*(*actor).target).x,
    (*(*actor).target).x,  // <-- should be .y in a fixed engine
    (*(*actor).target).z,
    MT_FIRE,
);

This is intentional for demo compatibility - vanilla demos depend on the buggy spawn position.

Location

room/src/doom/p_enemy.rs:1484 (flagged with // FIXME:).

Decision needed

Track whether the Rust port should:

  • keep the bug verbatim for demo compatibility (current behavior, no action), or
  • gate the fix behind a non-vanilla compat flag.

This issue tracks the divergence point; no fix is required if vanilla-faithful behavior is the project goal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-p_enemyArea: p_enemybugSomething isn't workingenhancementNew feature or requestkilo-triagedAuto-generated label by Kilo

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions