maxmanium Posted April 10, 2020 What do these fields actually correspond to in the code? I can't find any documentation on it. All it seems to be able to do is center the weapon sprite if you enter (1, 32), or maybe offset the sprite in another way, but why? What do these numbers mean? 0 Quote Share this post Link to post
Gez Posted April 10, 2020 They are the sprites' X and Y offsets. This is only relevant to HUD sprites, and it was unused in vanilla Doom (as well as in Heretic, and in Strife -- Hexen made use of them, though). MBF added some codepointers that use these fields as parameters, so you can use up to two custom values for some functions. An example of use is Valiant, in how the arachnotrons in that mod have a chance of spawning an arachnorb when they die: both the random chance and the spawning are made with these MBF functions that use the misc/unknown values. 6 Quote Share this post Link to post
Doomkid Posted April 12, 2020 Is it true that these can be used to speed up the weapon change time in vanilla Doom? I’ve heard that but haven’t been able to achieve it yet.. Something about having more open space around the sprite causing it to come up faster. It’s an awesome idea, especially for Deathmatch where weapon changing is a leading cause of death. 2 Quote Share this post Link to post
andrewj Posted April 12, 2020 As I read the DOOM source, they are not completely unused, the code in p_pspr.c does use those fields in one place: P_SetPsprite, and I think Doomkid is right in that when lowering weapons (via A_Lower) the current Y offset is decremented until the weapon is below the screen, so you can fool that logic to make weapon changing near instantaneous. 2 Quote Share this post Link to post
TheNoob_Gamer Posted April 12, 2020 (edited) 7 hours ago, Doomkid said: Is it true that these can be used to speed up the weapon change time in vanilla Doom? I’ve heard that but haven’t been able to achieve it yet.. Yes, provided you have at least 2 unused states/weapon. Edited April 12, 2020 by TheNoob_Gamer 1 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.