Skip to content

Scriptable Nearwall#201

Merged
themrdemonized merged 2 commits intothemrdemonized:landerfrom
Lander-Modding:scriptable-nearwall
May 1, 2025
Merged

Scriptable Nearwall#201
themrdemonized merged 2 commits intothemrdemonized:landerfrom
Lander-Modding:scriptable-nearwall

Conversation

@ProfLander
Copy link
Contributor

@ProfLander ProfLander commented May 1, 2025

Adds actor_hud_on_nearwall for intercepting and modifying the near-wall transforms from Lua.

It receives transform index, offset distance / direction, mutable offset matrix, and a mutable override flag for suppressing built-in behaviour. The barrel trace is updated after the offset is applied, so the crosshair and bullet impact point both respect it.

This should be sufficient to hook WCT's per-weapon offsetting logic into the new system without too much trouble. For demo purposes, I've uploaded my basic testing script as a gist. Drop it into gamedata, and weapons + devices should start tilting up instead of moving backward when approaching a wall with g_nearwall 2.

@ProfLander ProfLander changed the base branch from lander to all-in-one-vs2022-wpo May 1, 2025 04:30
@ProfLander ProfLander changed the base branch from all-in-one-vs2022-wpo to lander May 1, 2025 14:08
@ProfLander ProfLander force-pushed the scriptable-nearwall branch from 685baaf to 70eccd2 Compare May 1, 2025 14:11
@ProfLander
Copy link
Contributor Author

ProfLander commented May 1, 2025

Had to rebase this back onto lander and apply a small patch to prevent compile error following the addition of SCOPE_ATTACH_IDX offset application in #196.

@themrdemonized themrdemonized merged commit 9858f8d into themrdemonized:lander May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants