Thunder
#1
Anyone know why cWorld:GetNumPlayers is commented out? It could be used to make thunder work correctly.

int NumPlayers = GetNumPlayers();

class cThunderCaster : public cPlayerListCallback
{
	int m_PlayerToCastThunderAt;
	int m_CurrentPlayer;
	
	virtual bool Item(cPlayer * a_Player)
	{
		if (m_CurrentPlayer != m_PlayerToCastThunderAt)
		{
			return false;
		}
		
		// Cast thunder somewhere around the player
		return true;
	}
	
	public:
		cThunderCaster(int a_PlayerToCastThunderAt) :
			m_PlayerToCastThunderAt(a_PlayerToCastThunderAt),
			m_CurrentPlayer(0)
		{}
} ThunderCaster(GetTickRandomNumber(NumPlayers));

ForEachPlayer(ThunderCaster);
Reply
Thanks given by:


Messages In This Thread
Thunder - by NiLSPACE - 05-09-2015, 09:38 PM
RE: Thunder - by worktycho - 05-09-2015, 09:46 PM
RE: Thunder - by xoft - 05-09-2015, 10:02 PM
RE: Thunder - by worktycho - 05-09-2015, 10:04 PM
RE: Thunder - by xoft - 05-09-2015, 10:08 PM
RE: Thunder - by worktycho - 05-09-2015, 10:20 PM
RE: Thunder - by Shadowraix - 05-13-2015, 06:28 AM
RE: Thunder - by xoft - 05-13-2015, 06:40 AM
RE: Thunder - by Shadowraix - 05-13-2015, 07:14 AM
RE: Thunder - by xoft - 05-13-2015, 07:32 AM
RE: Thunder - by Shadowraix - 05-13-2015, 07:35 AM



Users browsing this thread: 2 Guest(s)