July 2012 FNF: Backpack Drop?
Posted: Tue Jul 17, 2012 7:00 pm
For the July FNF Special, should we add the Quake-style backpack drop, if applicable? Note that it will require Zandronum 1.0-alpha!
Leading the way in newschool multiplayer Doom online
https://zandronum.com/forum/
well hell if you're gonna do it that wayQent wrote: I wish, but most of the others requested them with a specific WAD. :/
Nope, it uses StrParam. Not just for the string, either- it's how it gets what weapon the player had, how much ammo, etc.Ivan wrote: Can't you make it Skulltag compatible ? I think the only part that needs to get erased is the pickup message part for it.
Backpack mod in 98dSynert wrote:Nope, it uses StrParam. Not just for the string, either- it's how it gets what weapon the player had, how much ammo, etc.Ivan wrote: Can't you make it Skulltag compatible ? I think the only part that needs to get erased is the pickup message part for it.
Code: Select all
Log("You got a backpack!");
Spoiler: CrappyCode (Open)EDIT: It appears that if I try to declare more than 19(?) variables in a script Skulltag/Zando crash.
Oh, really? My bad :xLlewellyn wrote: It was the only function in the acs using StrParam, so my outdated ACC didn't spew an error when I compiled it.
AFAIK that's some kind of limitation- ijon's been running into this problem as well.Llewellyn wrote: EDIT: It appears that if I try to declare more than 19(?) variables in a script Skulltag/Zando crash.
Sounds like a bug that needs to be reported?Synert wrote: AFAIK that's some kind of limitation- ijon's been running into this problem as well.
Synert wrote: Nope, it uses StrParam. Not just for the string, either- it's how it gets what weapon the player had, how much ammo, etc.
Code: Select all
ubuntu@ubuntu pk3/acs $ grep -Ein "StrParam|^script" quakebpak.c
93:script 393 (int mode)
191:script 394 (int check, int a1, int a2) clientside
197:script 395 (int check, int packWepNum) clientside
208: logStr = StrParam(s:logStr, s:" a ", s:WEPNAME[packWepNum]);
215: if ((packWepNum != -1) || (i > 0)) { logStr = StrParam(s:logStr, s:", "); }
217: logStr = StrParam(s:logStr, d:j, s:" ", s:AMMONAME[i], s:cond(j == 1, "", "s"));
yeah that's basically why StrParam is awesome - you don't need (as much) hackiness anymoreLlewellyn wrote: And have updated the earlier post with WORKING code, so you guys can replace Ijon's (sorry bro) neat looking code with my messy hack if you want to run it in Skulltag.
oh yes, that bug - it turns out acc blindly allocates 36 bytes (enough for exactly 19 ints) that can be used for variables - it probably actually allocates 40, but the first 4 are used for the script numberLlewellyn wrote: EDIT: It appears that if I try to declare more than 19(?) variables in a script Skulltag/Zando crash.