undead bug & Human
Posted: 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
Home to war3, war3ft, war3x and uwc3
https://www.wc3mods.net/forums/
Code: Select all
WC3_InitPlayerSkills( id )
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.whosyourdaddy wrote:after excute ham thing add this
Code: Select all
WC3_InitPlayerSkills( id )
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;
Code: Select all
// We're forcibly respawning the player - so lets just return
if ( bIgnorePlayerSpawning[id] )
{
return PLUGIN_CONTINUE;
}
Code: Select all
bIgnorePlayerSpawning[id] = false;
Code: Select all
bIgnorePlayerSpawning[id] = false;
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;
}