undead bug & Human

Read log files for errors! If this fails, come here for help

Moderator: Forum Moderator

Post Reply
The Tiger^^
Peon
Posts: 19
Joined: Mon Jul 16, 2007 2:51 pm

undead bug & Human

Post by The Tiger^^ » Wed Nov 19, 2008 7:28 am

wc3ft v3.0 rc12 bug, after scroll of Respawning ,can undead not be too high jump and Human has 100HP
Image

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Re: undead bug & Human

Post by YamiKaitou » Wed Nov 19, 2008 8:53 am

Provide more details about it. Did this bug exist before RC12? If so, is there an open bug report on it?
Image

No support via PM or Email

The Tiger^^
Peon
Posts: 19
Joined: Mon Jul 16, 2007 2:51 pm

Re: undead bug & Human

Post by The Tiger^^ » Wed Nov 19, 2008 11:42 am

after RC12, error logs, I have not undead bug is happening with me every time,humans bug when players.


sry for my bad english :(
Image

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Re: undead bug & Human

Post by YamiKaitou » Fri Nov 21, 2008 9:46 am

I bet you it is the Ham that caused it as that is the only thing I did for the respawn. I will look at it over the weekend anyways
Image

No support via PM or Email

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Re: undead bug & Human

Post by whosyourdaddy » Mon Nov 24, 2008 2:49 am

make it ExecuteHamB and not ExecuteHam
Image

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Re: undead bug & Human

Post by whosyourdaddy » Tue Nov 25, 2008 1:23 pm

after excute ham thing add this

Code: Select all

WC3_InitPlayerSkills( id )
Image

The Tiger^^
Peon
Posts: 19
Joined: Mon Jul 16, 2007 2:51 pm

Re: undead bug & Human

Post by The Tiger^^ » Wed Nov 26, 2008 6:10 am

it is not at shared.inl,I have shared.inl of version 3.0 RC11 installed,and bug still exists
Image

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Re: undead bug & Human

Post by YamiKaitou » Wed Nov 26, 2008 7:06 am

That is because the bug isn't fixed yet... It doesn't matter what version your includes are, as long as your .amxx is up to date. Hopefully it is a slow day at work today, I may be able to get some of these reports done at work
Image

No support via PM or Email

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Re: undead bug & Human

Post by whosyourdaddy » Wed Nov 26, 2008 2:31 pm

you mis-understood me in shared.inl after you have the ham module reviving the player insert

WC3_InitPlayerSkills( id )

so it will redo all the functions giving people there, hp, levitation, invisbility, speed, and everything else
Image

The Tiger^^
Peon
Posts: 19
Joined: Mon Jul 16, 2007 2:51 pm

Re: undead bug & Human

Post by The Tiger^^ » Thu Nov 27, 2008 4:47 am

Code: Select all

WC3_InitPlayerSkills( id )
where the need to
Image

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Re: undead bug & Human

Post by YamiKaitou » Thu Nov 27, 2008 6:59 pm

whosyourdaddy wrote:after excute ham thing add this

Code: Select all

WC3_InitPlayerSkills( id )
While it may solve the bug, it is not needed. It is already called, it is an issue with how we are detecting the respawn most likely, I haven't messed with it yet.
Image

No support via PM or Email

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Re: undead bug & Human

Post by whosyourdaddy » Fri Nov 28, 2008 8:22 pm

after u respawn where is it being called? i dont see it being called anywhere else
Image

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Re: undead bug & Human

Post by YamiKaitou » Fri Nov 28, 2008 9:28 pm

WC3_NewSession, which is called by EVENT_PlayerInitialSpawn (for CS and CZ, DoD is done differently), which is called by on_ResetHud
Image

No support via PM or Email

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Re: undead bug & Human

Post by whosyourdaddy » Sat Nov 29, 2008 1:25 pm

how about just place on_ResetHud( id ) after u have ham execute?
Image

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Re: undead bug & Human

Post by whosyourdaddy » Sat Nov 29, 2008 5:59 pm

kk well i found the problem its not register even its this in shared respawn we have this

Code: Select all

	// We don't want to call a crap-ton of WC3 functions when we're spawning them 3 times do we ?
	bIgnorePlayerSpawning[id] = true;
in reset hud we have this

Code: Select all

	// We're forcibly respawning the player - so lets just return
	if ( bIgnorePlayerSpawning[id] )
	{
		return PLUGIN_CONTINUE;
	}
now if u make

Code: Select all

bIgnorePlayerSpawning[id] = false;
then when they respawn it will execute the command but heres the nasty party, every round u will respawn with ur old weapons even if u dont have an ankh or an orc
Image

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Re: undead bug & Human

Post by whosyourdaddy » Sat Nov 29, 2008 7:49 pm

in shared spawn final theres

Code: Select all

	bIgnorePlayerSpawning[id] = false;
change it to true and ur all good to go. if u got any more bugs hit me up i think i can help out
Image

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Re: undead bug & Human

Post by whosyourdaddy » Sun Nov 30, 2008 7:20 pm

kk heres the bad part now, if u have a mole or ankh and get revive from a scroll or bm then it starts schrewing around and u get stuck with an ankh and wont reset it and changerace stops working
Image

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Re: undead bug & Human

Post by whosyourdaddy » Sun Nov 30, 2008 11:42 pm

quite a few changes for the bug fix here u go, tested and works

Code: Select all

// Function used to spawn a player
public _SHARED_Spawn( id )
{
	// Respawning isn't necessary w/CSDM - so lets not do that!
	if ( CVAR_csdm_active > 0 && get_pcvar_num( CVAR_csdm_active ) == 1 )
	{
		return;
	}

	id -= TASK_SPAWN;
	
	// Spawning doesn't work in DOD
	if ( g_MOD == GAME_DOD )
	{
		return;
	}

	// User is no longer connected or is not on a team
	if ( !p_data_b[id][PB_ISCONNECTED] || !SHARED_IsOnTeam( id ) )
	{
		return;
	}

	// Round has ended, lets give money back if they bought a scroll
	if ( g_EndRound )
	{
		if ( p_data[id][P_RESPAWNBY] == RESPAWN_ITEM )
		{
			client_print( id, print_chat, "%s Unable to respawn because the round is over, here is your money back", g_MODclient );

			SHARED_SetUserMoney( id, SHARED_GetUserMoney( id ) + ITEM_Cost( id, ITEM_SCROLL ) );
		}

		return;
	}

	// Reset items when the user spawns!
	g_iShopMenuItems[id][ITEM_SLOT_ONE]	= ITEM_NONE;
	g_iShopMenuItems[id][ITEM_SLOT_TWO] = ITEM_NONE;
	
	if ( is_user_alive( id ) )
	{
		return;
	}

	// Give the user godmode for a little
	set_user_godmode( id, 1 );
	p_data_b[id][PB_NO_DAMAGE] = true;

	// Save their previous weapons!
	SHARED_CopySavedWeapons( id );

	// Ignore the armor settaging...
	bIgnoreArmorSet[id] = true;

	// We don't want to call a crap-ton of WC3 functions when we're spawning them 3 times do we ?
	bIgnorePlayerSpawning[id] = false;

	p_data_b[id][PB_DIEDLASTROUND]		= false;

	p_data_b[id][PB_SLOWED]		= false;
	p_data_b[id][PB_STUNNED]	= false;

	// The user should no longer be a mole!
	p_data_b[id][PB_MOLE] = false;
	
	// Spawn the player
	ExecuteHamB(Ham_CS_RoundRespawn,id);

	// Reset the user's skin to normal
	SHARED_ChangeSkin( id, SKIN_RESET );

	set_task( 0.2, "_SHARED_Spawn_Final", TASK_SPAWNPLAYER + id );
	set_task( 0.4, "_SHARED_CS_GiveWeapons", TASK_GIVEITEMS + id );
	set_task( 1.0, "_SHARED_SpawnRemoveGod", TASK_SPAWNREMOVEGOD + id );

	return;
}

public _SHARED_SpawnRemoveGod( id )
{
	id -= TASK_SPAWNREMOVEGOD;

	// Only do this if the user is connected
	if ( p_data_b[id][PB_ISCONNECTED] )
	{
		set_user_godmode( id, 0 );
		p_data_b[id][PB_NO_DAMAGE] = false;
	}
}

// Function will just spawn a player again
public _SHARED_Spawn_Final( id )
{
	id -= TASK_SPAWNPLAYER;

	if ( !p_data_b[id][PB_ISCONNECTED] )
	{
		return;
	}
	
	bIgnoreArmorSet[id] = false;

	// If we don't give them a suit then they won't have a HUD
	give_item( id, "item_suit" );
	
	// Vengeance Check
	if ( p_data[id][P_RESPAWNBY] == RESPAWN_VENGEANCE )
	{
		set_user_health( id, VENGEANCE_HEALTH );
	}
	
	return;
}
Image

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Re: undead bug & Human

Post by YamiKaitou » Mon Dec 01, 2008 8:35 am

Bug fixed in Rev 551 (not using whosyourdaddy's posted methods)
Image

No support via PM or Email

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Re: undead bug & Human

Post by whosyourdaddy » Mon Dec 01, 2008 11:21 am

yama just make sure u dont get any respawn bugs, try buying and ankh when ur dead and then buy a scroll see if ankh or mole bugs
Image

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Re: undead bug & Human

Post by whosyourdaddy » Mon Dec 01, 2008 2:54 pm

the thing is that the bug happens on next round items, what im saying is that it happens if u have a ankh or mole and buy scroll when dead, just make sure it wont bug u
Image

Post Reply