PDA

View Full Version : DoDFun Bug Thread


Zor
03-23-2008, 11:12 PM
Let me know any bugs you find for DoDFun.

h0_noMan
12-29-2008, 11:30 PM
I think there are some bugs in dod_get_user_ammo().

- The Axis grenades are stored in the DODW_HANDGRENADE instead of the DODW_STICKGRENADE
- The Allie grenades are stored in : DODW_STG44, DODW_BAR, DODW_FG42 and DODW_BREN
- DODW_SPADE, DODW_AMERKNIFE and DODW_GERKNIFE are always at 1 (either if i am allie or axe)
- Some others errors while testing DODW_

Ex : If a choose the BAR then
DODW_SPRINGFIELD : 240
DODW_BAR : 0

This problems does not seems to appear in Windows, only on linux server (AMXX version do not matter 1.76d, 1.80 and 1.81)

Zor
12-30-2008, 02:56 PM
Once I get around to reworking I will look at this thx for upate!

Vet
05-09-2009, 01:00 AM
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.

diamond-optic
06-26-2009, 10:32 PM
ok the issue with the grenade throw seems to be it checks the model file name...

but since they always return w_grenade for some reason, the native always returns allied handgrenade


my c++ knowledge and amxx/module source code knowledge is pathetic so idk if ill be able to fix it myself

diamond-optic
06-26-2009, 11:37 PM
ok i think i got a fix...


i changed it so it checks the classname (as axis is grenade2 and allies is just grenade)


still gonna try and find another way to do it so it can detect the diff between a US nade and a BRITISH nade...



..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 104kb

i dont see how it would jump up in size so much when theres actually less code in it...


any ideas?

Dr.G
06-27-2009, 07:37 AM
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.

id like the source code can you attach it?


- cheers

diamond-optic
06-27-2009, 06:27 PM
you can get it off the amxx svn


heres the DoD Fun Module download: http://svn.tcwonline.org/viewvc.cgi/trunk/dlls/dod/dodfun.tar.gz?root=amxmodx&view=tar



and 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...

im 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)

diamond-optic
06-27-2009, 07:10 PM
ok i fixed the filesize crap lol...


i didnt realize it was set to compile it with debug info instead of being set to 'release' mode


*edit*

ok i think i got the grenade_throw forward fixed :)

returns 14/15 for stick, 13/16 for handgrenade, and 36/16 for mills... i hope i didnt make things sloppy lmao

Vet
10-06-2009, 12:42 AM
Where is this 'updated' module? The latest official DOD module (1.813) is still screwed up.

diamond-optic
10-06-2009, 04:04 AM
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 compile

if 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)

Dr.G
10-06-2009, 02:17 PM
Whats the changes? And the source code?

diamond-optic
10-06-2009, 02:26 PM
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...

Vet
10-07-2009, 02:19 AM
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?

diamond-optic
10-07-2009, 04:22 AM
its based off the 1.8.1.3746 revision (http://svn.alliedmods.net/viewvc.cgi/trunk/dlls/dod/dodfun/?root=amxmodx)

to be honest, i never even looked at the 1.76d source, i probably should compare it with 1.8.1

*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 it

as 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

Vet
10-07-2009, 10:04 PM
Where is the 1.76d source? I can't seem to wade through all those build versions.

diamond-optic
10-07-2009, 10:54 PM
http://svn.alliedmods.net/viewvc.cgi/tags/amxmodx-1.76d/dlls/dod2/dodfun/?root=amxmodx

Vet
10-12-2009, 09:09 PM
What am I missing...

The start of v1.76d is:
if ( !e->v.owner || !e->v.dmgtime )
RETURN_META(MRES_IGNORED);

int owner = ENTINDEX(e->v.owner);

and the start of v1.81 is:
if(!e->v.owner || !e->v.dmgtime)
{
int owner = ENTINDEX(e->v.owner);

It 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?

Dr.G
10-12-2009, 10:34 PM
It 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?

rofl no, but it looks like some one have.... that looks really odd. what the old code was ignoring the other is depending on... weirdness

Zor
10-13-2009, 08:02 AM
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.

Cheers!

Vet
10-13-2009, 10:40 AM
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 (http://svn.alliedmods.net/viewvc.cgi/trunk/dlls/dod/dodfun/moduleconfig.cpp?view=markup&revision=2525&root=amxmodx) and build 3392 (http://svn.alliedmods.net/viewvc.cgi/trunk/dlls/dod/dodfun/moduleconfig.cpp?view=markup&revision=3392&root=amxmodx). 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.

Zor
10-13-2009, 02:15 PM
Ok that is definately my stuff. What it looks like to me is the following:


if(!e->v.owner || !e->v.dmgtime)


In 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. :)

Now 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.

I 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.

Cheers!

Zor
10-13-2009, 02:22 PM
Wow duh, ok, I sometime have brain farts. Here we go again:


if(!e->v.owner || !e->v.dmgtime)


Ok the first part: !e->v.owner this is a rocket.
The 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.

I 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.

Cheers!

Vet
10-14-2009, 01:20 AM
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.

Vet
10-14-2009, 02:57 AM
I ran a quick test with the following code which simply reports the SetModel and Grenage_Throw values to the console...

#include <amxmisc>
#include <fakemeta>
#include <dodfun>

#define PLUGIN "DOD_thrownadetest"
#define VERSION "1.0"
#define AUTHOR "Vet(3TT3V)"

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_SetModel, "fw_setmodel")
}

public fw_setmodel(ent, modelname[])
{
new entowner = pev(ent, pev_owner)
client_print(0, print_chat, "SetModel: ent:%d owner:%d model:%s", ent, entowner, modelname)
}

public grenade_throw(id, entid, type)
{
static modelname[32]
pev(entid, pev_model, modelname, 31)
client_print(0, print_chat, "Nade thrown: id:%d ent:%d type:%d model:%s", id, entid, type, modelname)
}

and noticed that...
With v1.76d, the output is:
SetModel: ent:336 owner:1 model:models/w_grenade.mdl
SetModel: ent:336 owner:1 model:models/w_stick.mdl
Nade thrown: id:1 ent:336 type:14 model:models/w_stick.mdl

With v1.81, the output is:
SetModel: ent:336 owner:1 model:models/w_grenade.mdl
Nade thrown: id:1 ent:336 type:13 model:models/w_grenade.mdl
SetModel: ent:336 owner:1 model:models/w_stick.mdl

So in other words, the Grenade_Throw forward isn't called until after the correct model is set with SetModel in the older version.

Zor
10-14-2009, 08:03 AM
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.

Cheers!

Vet
10-14-2009, 10:36 AM
Take care of yourself first. This stuff isn't critical.