|
发表于 2007-12-11 18:28:18
|
显示全部楼层
来自 中国–广东–惠州–惠城区
回复: 含有"HLTV"的这句代码是表示什么意思啊?
我是以玩家得到C4时触发事件来代替HLTV事件的,理论上应该是在相同的时间内触发,都是包括锁定时间在内的.这是EVENT_NewRound函数的代码.你自己看下吧
[php]
public EVENT_NewRound()
{
if ( !WC3_Check() )
{
return;
}
// Reset the global ultimate delay
g_iUltimateDelay = get_pcvar_num( CVAR_wc3_ult_delay );
// User's have not spawned yet, so lets do some pre-spawn things
new players[32], numplayers, i;
get_players( players, numplayers );
for ( i = 0; i < numplayers; i++ )
{
WC3_BeforeSpawn( players );
}
// Reset which spawn points are reserved....
_SHARED_SpawnReset();
// If someone restarted the game, then lets reset war3
if ( g_GameRestarting )
{
WC3_ResetGame();
}
// Randomize Chameleon if we need to
CHAM_Randomize();
// We need to determine when the buytime is up
if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO )
{
if ( get_pcvar_num( CVAR_wc3_buy_time ) )
{
// Remove our buytime task if it exists (from a previous round)
( task_exists( TASK_BUYTIME ) ) ? remove_task( TASK_BUYTIME ) : 0;
g_buyTime = true;
set_task( get_cvar_float("mp_buytime") * 60.0, "_CS_BuyTimeOver", TASK_BUYTIME );
}
g_freezeTime = true;
}
g_EndRound = false;
}
[/php] |
|