int light_lev; // ssqc
int movement; // ssqc
int nextthink; // common - used by OP_STATE
+ int netaddress; // ssqc
int nodrawtoclient; // ssqc
int pflags; // ssqc
int ping; // ssqc
prog->fieldoffsets.lerpfrac = PRVM_ED_FindFieldOffset("lerpfrac");
prog->fieldoffsets.light_lev = PRVM_ED_FindFieldOffset("light_lev");
prog->fieldoffsets.movement = PRVM_ED_FindFieldOffset("movement");
+ prog->fieldoffsets.netaddress = PRVM_ED_FindFieldOffset("netaddress");
prog->fieldoffsets.nextthink = PRVM_ED_FindFieldOffset("nextthink");
prog->fieldoffsets.nodrawtoclient = PRVM_ED_FindFieldOffset("nodrawtoclient");
prog->fieldoffsets.pflags = PRVM_ED_FindFieldOffset("pflags");
char playermodel[MAX_QPATH], old_model[MAX_QPATH];
char playerskin[MAX_QPATH], old_skin[MAX_QPATH];
+ // netaddress support
+ char netaddress[MAX_QPATH];
+
// visibility state
float visibletime[MAX_EDICTS];
PRVM_EDICTFIELDVALUE(e, prog->fieldoffsets.playermodel)->string = PRVM_SetEngineString(svs.clients[num].playermodel);
if( prog->fieldoffsets.playerskin >= 0 )
PRVM_EDICTFIELDVALUE(e, prog->fieldoffsets.playerskin)->string = PRVM_SetEngineString(svs.clients[num].playerskin);
+ // Assign netaddress (IP Address, etc)
+ if(prog->fieldoffsets.netaddress >= 0)
+ { // Valid Field; Process
+ if(svs.clients[num].netconnection != NULL)
+ {// Valid Address; Assign
+ // Acquire Readable Address
+ LHNETADDRESS_ToString(&svs.clients[num].netconnection->peeraddress, svs.clients[num].netaddress, sizeof(svs.clients[num].netaddress), false);
+ PRVM_EDICTFIELDVALUE(e, prog->fieldoffsets.netaddress)->string = PRVM_SetEngineString(svs.clients[num].netaddress);
+ }
+ else
+ // Invalid / Bot
+ PRVM_EDICTFIELDVALUE(e, prog->fieldoffsets.netaddress)->string = PRVM_SetEngineString("null/botclient");
+ }
}
}
{ev_float, "items2"},
{ev_float, "light_lev"},
{ev_float, "pflags"},
+ {ev_string, "netaddress"},
{ev_float, "ping"},
{ev_float, "pitch_speed"},
{ev_float, "pmodel"},