Raised This Month: $51 Target: $400
 12% 

[DoDx] dod_get_map_info non functional after a few mapchange


  
 
 
Thread Tools Display Modes
Author Message
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 08-31-2005 , 17:43   [DoDx] dod_get_map_info non functional after a few mapchange
#1

hey guys,

the native dod_get_map_info(info) is starting to act weird
after a few mapchanges.

it's used to get info about the teams on the current map with
dod_get_map_info(MI_ALLIES_TEAM) which is 0 for americans and 1 for british team.
and
dod_get_map_info(MI_ALLIES_PARAS) which is 0 if it's normal troops and 1 if it's para troops.
and
dod_get_map_info(MI_AXIS_PARAS) which is 0 if it's normal troops and 1 if it's para troops.

the detection simply isn't working anymore and always the britisch team
is detected even if it's americans and always the paratroops are detected,
even if it's normal troops.

that strange behavior happens since 1.50beta and is seriously screwing
up a lot of my plugins.
a lot of people have reported that and i tested it myself on standard maps.

i would really be greatful if SidLuke or one of the other devs would
take a look at it!

i seriously need this working!

thanks guys!
FeuerSturm is offline
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 09-01-2005 , 08:21   Re: [DoDx] dod_get_map_info non functional after a few mapch
#2

Quote:
Originally Posted by FireStorm
that strange behavior happens since 1.50beta
Strange, I did not change anything there
OnAmxxAttach() function should clear map info ( g_map.Init() ) after map change
__________________
Looking for DoD plugins ? Check DoD Plugins Center
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 09-01-2005 , 10:14  
#3

okay, here's some more info to bring some light into the dark!

i used this little plugin to get some more info:
Code:
#include <amxmodx> #include <dodx> public plugin_init(){     register_plugin("Test TeamDetect","1.0","[RST] FireStorm")     set_task(5.0,"get_info") } public get_info(){     log_to_file("TeamDetect.log","==============================")     new currmapname[32]     get_mapname(currmapname,31)     log_to_file("TeamDetect.log","Current map: %s",currmapname)     if(dod_get_map_info(MI_ALLIES_TEAM) == 0){         log_to_file("TeamDetect.log","Current Allied Team: Americans")     }     if(dod_get_map_info(MI_ALLIES_TEAM) == 1){         log_to_file("TeamDetect.log","Current Allied Team: Brits")     }     if(dod_get_map_info(MI_ALLIES_PARAS) == 0){         log_to_file("TeamDetect.log","Allied Forces: Standard Troops")     }     if(dod_get_map_info(MI_ALLIES_PARAS) == 1){         log_to_file("TeamDetect.log","Allied Forces: Para Troops")     }     if(dod_get_map_info(MI_AXIS_PARAS) == 0){         log_to_file("TeamDetect.log","Axis Forces: Standard Troops")     }     if(dod_get_map_info(MI_AXIS_PARAS) == 1){         log_to_file("TeamDetect.log","Axis Forces: Para Troops")     }     return PLUGIN_HANDLED }

and it seems that the first map with Brits locks the team info as well
as the first map with para troopers locks the para info.

i hope that helps a bit to fix it!

here's the log:


P.S.:
@SidLuke:
i didn't say that you messed it up, that's why i posted it here
FeuerSturm is offline
BAILOPAN
Join Date: Jan 2004
Old 09-01-2005 , 23:30   Re: [DoDx] dod_get_map_info non functional after a few mapch
#4

Quote:
Originally Posted by SidLuke
Strange, I did not change anything there
OnAmxxAttach() function should clear map info ( g_map.Init() ) after map change
No, it shouldn't as of 1.50, metamod-modules don't reload on mapchange. Relying OnAmxxAttach() will only get when module is loaded. I've switched this in CVS to "g_map.Init()" on ServerActivate, which is guaranteed to be called at the right time.

So, this bug should be fixed. I've attached a test binary. If it's not fixed, I'm leaving this report open so SidLuke can ask questions or fix up his other modules that might be affected by this change.

Thanks!
Attached Files
File Type: zip dodx_amxx.zip (43.6 KB, 109 views)
__________________
egg
BAILOPAN is offline
windy
Junior Member
Join Date: Sep 2005
Old 09-02-2005 , 09:48  
#5

Thanks, I will test this on my Windows server


Do you have a dodx_amxx_i386.so Linux version as well by any chance?
windy is offline
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 09-02-2005 , 10:16  
#6

unfortunately it's not working, now the info isn't updated at all
anymore and keeps:
Code:
Current Allied Team: Americans
Allied Forces: Standard Troops
Axis Forces: Standard Troops
for all maps, no matter which one is played
FeuerSturm is offline
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 09-02-2005 , 12:50  
#7

Bailopan .. i will fix it

g_map.Init() must be in OnAmxxAttach()
and I will add it also in ServerDeactivate ...



ServerActivate is after DispatchKeyValue ...
__________________
Looking for DoD plugins ? Check DoD Plugins Center
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode