DoDFun Bug Thread
by Zor · 2008-03-24 · 27 replies · 21244 views · 28 downloads
From the first post
Added later in the thread
| dodfun_amxx.dll | Module Binary | 96 KB | 16 dl | Download |
| dodfun2_source.zip | Archive | 3 MB | 12 dl | Download |
The thread
All 28 posts from 6 people on DoDFun Bug Thread, kept as they were written.
Threads: 75
Joined: Jun 2006
Let me know any bugs you find for DoDFun.
Threads: 11
Joined: Dec 2007
I think there are some bugs in dod_get_user_ammo().rnrn- The Axis grenades are stored in the DODW_HANDGRENADE instead of the DODW_STICKGRENADErn- The Allie grenades are stored in : DODW_STG44, DODW_BAR, DODW_FG42 and DODW_BRENrn- DODW_SPADE, DODW_AMERKNIFE and DODW_GERKNIFE are always at 1 (either if i am allie or axe)rn- Some others errors while testing DODW_rnrn Ex : If a choose the BAR then rnDODW_SPRINGFIELD : 240rnDODW_BAR : 0rnrnThis problems does not seems to appear in Windows, only on linux server (AMXX version do not matter 1.76d, 1.80 and 1.81)
Threads: 75
Joined: Jun 2006
Once I get around to reworking I will look at this thx for upate!
Threads: 24
Joined: Oct 2006
The grenade_throw() routine returns the wrong weapon IDs if you throw a stickgrenade or stickgenade_ex. It should return 14 and 15, but instead returns 13 and 16 which are the handgrenade and handgrenade_ex IDs.
Threads: 103
Joined: May 2005
ok the issue with the grenade throw seems to be it checks the model file name...nnbut since they always return w_grenade for some reason, the native always returns allied handgrenadennnmy c++ knowledge and amxx/module source code knowledge is pathetic so idk if ill be able to fix it myself
Threads: 103
Joined: May 2005
ok i think i got a fix...nnni changed it so it checks the classname (as axis is grenade2 and allies is just grenade)nnnstill gonna try and find another way to do it so it can detect the diff between a US nade and a BRITISH nade...nnnn..also does anyone have any experience with compiling this stuff?? i get a few warnings but im just ignoring them and it compiles anyway... but the filesize is like 421kb... the original binary that comes with amxx is only 104kbnni dont see how it would jump up in size so much when theres actually less code in it...nnnany ideas?
Threads: 75
Joined: Nov 2007
i guess you have looked at this already http://wiki.amxmodx.org/Module_Writing_(AMX_Mod_X) I belive that brit nades is just pimped hand grenades, only the skin i changed, i did some testing with it long ago, i think hehe.. well ive seen Zor on steam lately, so maybe its just to weak him up. idk if its worth any but maybe you can fix dod_set_fuse while you are at it.rnrnid like the source code can you attach it?rnrnrn- cheers
Threads: 103
Joined: May 2005
you can get it off the amxx svnnnnheres the DoD Fun Module download: http://svn.tcwonline.org/viewvc.cgi/trunk/dlls/dod/dodfun.tar.gz?root=amxmodx&view=tarnnnnand with the nades.. i would say in most cases it wont matter if its handgrenade or mills bomb.. but maybe i can throw in something to check if the map is us or brit and go from there...nnim still confused about the 4x file size after compiling... maybe its something to do with vc++ 2008... ill try and ask zor, otherwise maybe i can get ahold of bail or someone from amxx (as i would prefer not to post about it on the amxx forums lol)
Threads: 103
Joined: May 2005
ok i fixed the filesize crap lol...nnni didnt realize it was set to compile it with debug info instead of being set to 'release' modennn*edit*nnok i think i got the grenade_throw forward fixed :)nnreturns 14/15 for stick, 13/16 for handgrenade, and 36/16 for mills... i hope i didnt make things sloppy lmao
Threads: 24
Joined: Oct 2006
Where is this 'updated' module? The latest official DOD module (1.813) is still screwed up.
Threads: 103
Joined: May 2005
i havent done a thing with it in a long while (dont even have vc++ installed anymore) but i believe this was the latest win32 compilennif i do recall correctly, "amxx modules" should display it as like DoD Fun 2 v1.0 (as i didnt wanna do anything with the amxx version numbering)
Threads: 75
Joined: Nov 2007
Whats the changes? And the source code?
Threads: 103
Joined: May 2005
to be honest, i dont recall if i did anything other then fix the grenade_throw forward.. id have to compare it to the stock source code and see...
Threads: 24
Joined: Oct 2006
Your module works fine. Do you remember what version you used for a base/reference? What I'm getting at is, is there any other updated code from v1.76d to the version you used as a base, that would make it reasonable to use your update module over v1.76d?
Threads: 103
Joined: May 2005
its based off the 1.8.1.3746 revision (http://svn.alliedmods.net/viewvc.cgi/trunk/dlls/dod/dodfun/?root=amxmodx)nnto be honest, i never even looked at the 1.76d source, i probably should compare it with 1.8.1nn*edit* i just looked at 1.76d real quick, and i probably should have looked at it sooner lol.. I think the way 1.76d does it is faster then the way i did itnnas far as the differences between 1.76d and 1.8.1, i have no idea lol.. i cant remember anymore if there theres newer natives in the include file or not.. and as for the source code, like i said, never compared them or anything in the past
Threads: 24
Joined: Oct 2006
Where is the 1.76d source? I can't seem to wade through all those build versions.
Threads: 103
Joined: May 2005
Threads: 24
Joined: Oct 2006
What am I missing...rnrnThe start of v1.76d is:rn
if ( !e->v.owner || !e->v.dmgtime )rn RETURN_META(MRES_IGNORED);rnrn int owner = ENTINDEX(e->v.owner);rnrnand the start of v1.81 is:rn if(!e->v.owner || !e->v.dmgtime)rn {rn int owner = ENTINDEX(e->v.owner);rnrnIt looks like the newer code's condition is opposite the older code's condition. So the newer module doesn't get executed under the same conditions as the older code. Or have I been drinkin' too much?Threads: 75
Joined: Nov 2007
rnIt looks like the newer code's condition is opposite the older code's condition. So the newer module doesn't get executed under the same conditions as the older code. Or have I been drinkin' too much?rnrnrofl no, but it looks like some one have.... that looks really odd. what the old code was ignoring the other is depending on... weirdness
Threads: 75
Joined: Jun 2006
Vet: What file and what line number and I will look at it. I was probably the one who did that as that is my coding style. Have to look at the whole code area though to let you know whats what.rnrnCheers!
Threads: 24
Joined: Oct 2006
It appears to have originated way back in version 1.77 (subsequently named 1.80). Its in the moduleconfig.cpp file in the SetModel_Post routine. The differences referenced are from build 2528 and build 3392. I sent a PM to sawce at AlliedMods mentioning the problem but haven't heard back from him. Thanks for taking the time to look into this.
Threads: 75
Joined: Jun 2006
Ok that is definately my stuff. What it looks like to me is the following:rnrn
rnif(!e->v.owner || !e->v.dmgtime)rnrnrnIn the old one this basically means it was either a rocket, which has no owner, or a grenade that has gone off. In my version I am looking to make sure that it doesn't have either of those. Now I see that the problem is that if the grenade has gone off its useless to set the timer on it. :)rnrnNow I am going to have to install VC++ or something that I can compile this with and fiddle around with it and put it up on the site, and perhaps update the code at amxmodx if I can remember my password for the svn to upload.rnrnI will take a quick look at it here in a minute and do some fixes. I will have to get someone else to compile it at the moment cause I am getting ready to go away for a bit. Will see.rnrnCheers!Threads: 75
Joined: Jun 2006
Wow duh, ok, I sometime have brain farts. Here we go again:rnrn
rnif(!e->v.owner || !e->v.dmgtime)rnrnrnOk the first part: !e->v.owner this is a rocket.rnThe second part: !e->v.dmgtime this is a grenade, we say not because it means its more than 0 ie e->v.dmgtime > 0 means the same thing. Which means there is still time on it. So I do NOT know why the original source had it that way, oh yes thats right, cause it it never looked at rocket, and this model call is for ALL models. So when a tank gets loaded, which has a model, it will have neither.rnrnI could optimize it a bit and check to see if its a w_**** or a weapon model, and check to see if its a *rocket*, then continue this func, all others dropped. But thats neither here nor there.rnrnCheers!Threads: 24
Joined: Oct 2006
Also, it appears that the forward/function 'rocket_shoot' was also created. But I see no reference to it here or at alliedmods or at amxmodx.
Threads: 24
Joined: Oct 2006
I ran a quick test with the following code which simply reports the SetModel and Grenage_Throw values to the console...nn
#include <amxmisc>n#include <fakemeta>n#include <dodfun>nn#define PLUGIN "DOD_thrownadetest"n#define VERSION "1.0"n#define AUTHOR "Vet(3TT3V)"nnpublic plugin_init()n{n register_plugin(PLUGIN, VERSION, AUTHOR)n register_forward(FM_SetModel, "fw_setmodel")n}nnpublic fw_setmodel(ent, modelname[])n{n new entowner = pev(ent, pev_owner)n client_print(0, print_chat, "SetModel: ent:%d owner:%d model:%s", ent, entowner, modelname)n}nnpublic grenade_throw(id, entid, type)n{n static modelname[32]n pev(entid, pev_model, modelname, 31)n client_print(0, print_chat, "Nade thrown: id:%d ent:%d type:%d model:%s", id, entid, type, modelname)n} nnand noticed that...nWith v1.76d, the output is:nSetModel: ent:336 owner:1 model:models/w_grenade.mdlnSetModel: ent:336 owner:1 model:models/w_stick.mdlnNade thrown: id:1 ent:336 type:14 model:models/w_stick.mdlnnWith v1.81, the output is:nSetModel: ent:336 owner:1 model:models/w_grenade.mdlnNade thrown: id:1 ent:336 type:13 model:models/w_grenade.mdlnSetModel: ent:336 owner:1 model:models/w_stick.mdlnnSo in other words, the Grenade_Throw forward isn't called until after the correct model is set with SetModel in the older version.Threads: 75
Joined: Jun 2006
I found some interesting new code in the NS module, I am currently ripping it apart to work on it so as to make the code for dodx better and to include fun into it. I only have about a week before I go away on course, and have to get everything packed up. So, don't know how far I will get, but it is actually working the way I wanted it to way back. So, lets hope its an easy conversion.rnrnCheers!
Threads: 24
Joined: Oct 2006
Take care of yourself first. This stuff isn't critical.
Threads: 49
Joined: Jan 2006
A patch to the dev version of Amxmodx may have fixed this.rnrnhttp://forums.alliedmods.net/showthread.php?p=1985437

