I have always had problems calling functions that are members of
CBaseEntity/CBasePlayer in linux, they work great on windows tho :(.
Would like to know if there was a solution to this as well.
- voogru.
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 18, 2003 2:09 AM
Subject: [hlcoders] Player Revival on Linux
> Hi,
> I'm using the following code to respawn players in a metamod plugin for
Counter-Strike.
> It works wonderfully on windows but _crashes_ my linux server when I
enter the command.
> Here's the code... any insight on why it could be doing this?
> -----David "BAILOPAN" Anderson
>
> CBaseEntity *pPlayer = UTIL_PlayerByIndex(PlayerIndex);
> edict_t *player
> player = pPlayer->edict();
> CBasePlayer *cbPlayer = (CBasePlayer *)pPlayer;
> if (!sPlayerValid(pPlayer)) return 0;
> if (pPlayer->pev->deadflag ==
((DEAD_DYING)||(DEAD_DEAD)||(DEAD_RESPAWNABLE))) {
> //Note - I used this because respawn() gave me link errors even though
I included client.h
> cbPlayer->Spawn();
> pPlayer->pev->button = 0;
> cbPlayer->m_iRespawnFrames = 0;
> pPlayer->pev->nextthink = -1;
> }
>
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders