Spectators Respawning

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

Moderator: Forum Moderator

Post Reply
slmclarengt
Militia
Posts: 68
Joined: Thu Mar 09, 2006 7:30 pm

Spectators Respawning

Post by slmclarengt » Sun Oct 12, 2008 5:59 pm

Ok, I've heard this is an issue and I've investigated it myself in the lovely world of code ;-).

In shared.inl:

Code: Select all

public SHARED_IsOnTeam( id )
{
	new iTeam = get_user_team( id );

	// Counter-Strike or Condition Zero Check
	if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO )
	{
		if ( iTeam == CTS || iTeam == TS )
		{
			return true;
		}
	}

	// Day of Defeat Check
	else if ( g_MOD == GAME_DOD )
	{
		if ( iTeam == ALLIES || iTeam == AXIS )
		{
			return true;
		}
	}

	return false;
}
I recommend the following amendment(s):

Code: Select all

public SHARED_IsOnTeam( id )
{
	new team[2]
	get_user_team(id,team,1);

	// Counter-Strike or Condition Zero Check
	if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO )
	{
		if ( team[0] == 'C' || team[0] == 'T' )
		{
			return true;
		}
	}

	// Day of Defeat Check
	else if ( g_MOD == GAME_DOD )
	{
		if ( iTeam == ALLIES || iTeam == AXIS )
		{
			return true;
		}
	}

	return false;
}
I am merely trying to find a way to stop people from respawning using scroll of respawn when they are spectating. I am not an avid programmer but still putting forth an effort. I would like to know if this is not right (I'm not using it because I'm concerned it's wrong ;-)) and if not, how can this be accomplished?

Btw, this is using the latest binaries from the SVN as of ~4:30PM.

Slmclarengt aka sleeper @ bndclan.com
"I am become Death destroyer of worlds" - Hindu God Krishna speaking with Soldier about battle (Later quoted by Robert Oppenheimer, head of the Manhattan Project in Los Alamos Laboratories.)

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

Re: Spectators Respawning

Post by whosyourdaddy » Mon Oct 13, 2008 12:45 am

wait are u saying that you can buy a scroll when ur in spectate mode?
Image

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Re: Spectators Respawning

Post by Geesu » Mon Oct 13, 2008 10:15 pm

@ slmclarengt

I *believe* this is not a bug w/that function - but rather a bug with the spawn() function in HL. Sometimes you will spawn w/o a HUD - and you're on "spectator" team - kind of.

It's f'ed up... but you should never be able to buy a scroll while in spectator - if you can prove me wrong pls show a demo :P
No Support via PM

slmclarengt
Militia
Posts: 68
Joined: Thu Mar 09, 2006 7:30 pm

Re: Spectators Respawning

Post by slmclarengt » Tue Oct 14, 2008 1:40 pm

I don't actually play much in my own server but many people do. I think I found out the respawning as spectator has nothing to do with WC3 but rather with amx_super's function amx_revive.

Thanks,

Slmclarengt
"I am become Death destroyer of worlds" - Hindu God Krishna speaking with Soldier about battle (Later quoted by Robert Oppenheimer, head of the Manhattan Project in Los Alamos Laboratories.)

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

Re: Spectators Respawning

Post by YamiKaitou » Wed Oct 15, 2008 8:54 am

Only if you are spec when you use the command amx_revive will you be respawned as a spectator. There is no bug with this command that effects wc3ft.
Image

No support via PM or Email

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

Re: Spectators Respawning

Post by whosyourdaddy » Wed Oct 15, 2008 3:39 pm

well actually i think i got an idea not sure how well it will work but its a pretty good one, the reason people get the scroll glicth is because they buy it when they lag or ping is over 400 or 500(i believe its 500) i tested it out myself put up downloads and tried buying a scroll and it glicthed me, i think there should be a ping check and if the users ping is greater than 300 then put a set task to check again if not then do the scroll function
Image

Post Reply