QuestionSome questions

Posts 1–3 of 3 · Page 1 of 1
Some questions
This thread can be closed
Quote Originally Posted by PassT View Post
First question: I noticed a virtual function called getgamemode in iltclient or iltbase. My understanding is to get the current game mode? But I found that this virtual function has an int mode parameter, which I can't understand. Because I don't see anyone using this virtual function, at least in mpgh. So I think maybe someone can give me some inspiration. If it can be solved, I can better and more convenient access to the current game mode, so as to draw the number of enemies that should be drawn, without wasting too much resources( If my understanding is wrong, please correct me)

Another problem: I get the AI entity list in AClientObjectManager and can draw the bone / print the blood volume completely. However, when the AI dies, the loss of the entity will cause problems (maybe loss) in other surviving AI entities, resulting in the disappearance of the bone (blood volume) already painted on the AI body. But when I trigger the game mechanism to increase the number of AI, the lost entities will recover. I'm sure the number follows the number of AI in the current match (no entity will be lost due to too few cycles)

Thanks in advance
Code:
/*!
Use this to start a game.
*/

enum
{

//! Start a world and host it (using dialogs).
    STARTGAME_HOST =      0,

//! Start a world and host on TCP/IP.
    STARTGAME_HOSTTCP =   1,

//! Connect to a server using dialogs.
    STARTGAME_CLIENT =    2,

//! Connect to the first TCP/IP game it can find at m_pTCPAddress.
    STARTGAME_CLIENTTCP = 3,

//! Start a normal game.
    STARTGAME_NORMAL =    4,

//! (Used for GetGameMode, means we're not running a world or on a server yet).
    GAMEMODE_NONE =       5
};


bool IsMultiplayerGame()
{
	int nGameMode = 0;
	ilt_client_imp->GetGameMode(&nGameMode);
	if (nGameMode == STARTGAME_NORMAL || nGameMode == GAMEMODE_NONE)
		return false;

	return true;
}
Quote Originally Posted by jayjay153 View Post


Code:
/*!
Use this to start a game.
*/

enum
{

//! Start a world and host it (using dialogs).
    STARTGAME_HOST =      0,

//! Start a world and host on TCP/IP.
    STARTGAME_HOSTTCP =   1,

//! Connect to a server using dialogs.
    STARTGAME_CLIENT =    2,

//! Connect to the first TCP/IP game it can find at m_pTCPAddress.
    STARTGAME_CLIENTTCP = 3,

//! Start a normal game.
    STARTGAME_NORMAL =    4,

//! (Used for GetGameMode, means we're not running a world or on a server yet).
    GAMEMODE_NONE =       5
};


bool IsMultiplayerGame()
{
	int nGameMode = 0;
	ilt_client_imp->GetGameMode(&nGameMode);
	if (nGameMode == STARTGAME_NORMAL || nGameMode == GAMEMODE_NONE)
		return false;

	return true;
}
All in all, thank you, sir. Helped me solve my first doubt
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?