Heyho,
Sorry that I post here but if I go under Bug reports then comes there I have no access to that section...
Whatever. I think I've found a "bug" in wc3ft. If you look in the war3ft.inl then you will find there the function wc3_bevorespawn.
This function will called for every player bevore the spawn. Allright. But you load in wc3_bevorespawn the function SHARED_CopySavedWeapons for every player although you only need to load this function once per round. And the ID parameter is useless there I think.
Thanks for attentation.
DarkAngel aka DA
Bug in wc3:ft
Moderator: Forum Moderator
Bug in wc3:ft
Developer of the UWC3 Next Generation mod.
http://www.fun-arena.com
http://www.fun-arena.com
Re: Bug in wc3:ft
You don't need to load it once per round... You need to load it EVERY time a weapon changes...
Also - what issue are you having on the bug report section? you can't login?
Also - what issue are you having on the bug report section? you can't login?
No Support via PM
Re: Bug in wc3:ft
I talk about SHARED_CopySavedWeapons NOT SHARED_SaveWeapons.Geesu wrote:You don't need to load it once per round... You need to load it EVERY time a weapon changes...
Also - what issue are you having on the bug report section? you can't login?
Look in the shared.inl you will see the problem...
I'm already logged in.
Code: Select all
You are not authorised to read this forum.
Developer of the UWC3 Next Generation mod.
http://www.fun-arena.com
http://www.fun-arena.com
Re: Bug in wc3:ft
What link are you clicking when it says that?
Also - I don't entirely understand what the issue is - where are you saying it should copy instead? And why? I believe it's currently working fine.
Also - I don't entirely understand what the issue is - where are you saying it should copy instead? And why? I believe it's currently working fine.
No Support via PM
Re: Bug in wc3:ft
events.inl - In the EVENT_NewRound()
You loop through all players and start for every player the WC3_BeforeSpawn function. That's okay. Now look in the WC3_BeforeSpawn function.
Here we are in a critical situation. You start for every player this function:
This function copy one array to another array. But you do this for every player. I think your first idea of this function was this:
Now you understand? It's actually not a bug but it takes many CPU usage...
Code: Select all
// User's have not spawned yet, so lets do some pre-spawn things
new players[32], numplayers, i;
get_players( players, numplayers );
for ( i = 0; i < numplayers; i++ )
{
WC3_BeforeSpawn( players[i] );
}
Code: Select all
// Save a copy of what weapons the user had the previous round (for weapon reincarnation)
SHARED_CopySavedWeapons( id );
Code: Select all
// Copy the weapons over right before reset hud is called, that way we don't lose our last round weapons when the round restarts
public SHARED_CopySavedWeapons( id )
{
for ( new i = 0; i < 33; i++ )
{
for ( new j = 0; j < 32; j++ )
{
g_PlayerLastWeapons[i][j] = g_PlayerWeapons[i][j];
}
}
}
Code: Select all
// Copy the weapons over right before reset hud is called, that way we don't lose our last round weapons when the round restarts
public SHARED_CopySavedWeapons( id )
{
for ( new j = 0; j < 32; j++ )
{
g_PlayerLastWeapons[id][j] = g_PlayerWeapons[id][j];
}
}
The link on the forumindex. But I see you have fixed it. ThanksWhat link are you clicking when it says that?
Developer of the UWC3 Next Generation mod.
http://www.fun-arena.com
http://www.fun-arena.com
Re: Bug in wc3:ft
haha I get it now that's a funny bug - can you add to bug reports pls?
Opps
Opps
No Support via PM