close
ent_sendnoew(entity)

In a multiplayer state, we can't send too many data to server or the network will lag.
so we set "entity.nosend" flag to on that client won't send data anymore.
but before stop sending data, we must send all the updated data to server first.
In other words, we have to make sure all other client have received the player's latest data. 
That's why we use the "ent_sendnoew(entity)".

The data to be send : model force and position

EX:

ent_create("laserflash.mdl",my.x,laserflash);

// generate a laser flash  ... 

function laserflash 
{    
         ent_sendnow(my);   // force model and position to be sent in the next cycle    
         wait(1);         // make sure it's sent now    
         my.nosend = on;  // don't send anything further     
         ... 
}



arrow
arrow
    全站熱搜
    創作者介紹
    創作者 SkyChord 的頭像
    SkyChord

    No fUtUrE

    SkyChord 發表在 痞客邦 留言(0) 人氣()