entWatch4: Rename iOwner to iClient.
Seems more logical this way.
This commit is contained in:
parent
bc3fae77d4
commit
7eb8b766c6
@ -12,7 +12,7 @@ methodmap CItem < Basic
|
||||
|
||||
myclass.SetHandle("dConfig", value);
|
||||
|
||||
myclass.SetInt("iOwner", INVALID_ENT_REFERENCE);
|
||||
myclass.SetInt("iClient", INVALID_ENT_REFERENCE);
|
||||
myclass.SetInt("iButton", INVALID_ENT_REFERENCE);
|
||||
myclass.SetInt("iWeapon", INVALID_ENT_REFERENCE);
|
||||
myclass.SetInt("iTrigger", INVALID_ENT_REFERENCE);
|
||||
@ -37,15 +37,15 @@ methodmap CItem < Basic
|
||||
}
|
||||
|
||||
|
||||
property int iOwner
|
||||
property int iClient
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return this.GetInt("iOwner");
|
||||
return this.GetInt("iClient");
|
||||
}
|
||||
public set(int value)
|
||||
{
|
||||
this.SetInt("iOwner", value);
|
||||
this.SetInt("iClient", value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -111,11 +111,11 @@ methodmap CItem < Basic
|
||||
}
|
||||
|
||||
|
||||
property bool bOwner
|
||||
property bool bClient
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return view_as<bool>(this.iOwner != INVALID_ENT_REFERENCE);
|
||||
return view_as<bool>(this.iClient != INVALID_ENT_REFERENCE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -370,9 +370,9 @@ public void OnClientDisconnect(int client)
|
||||
{
|
||||
CItem item = g_hArray_Items.Get(index);
|
||||
|
||||
if (item.bOwner && item.iOwner == client)
|
||||
if (item.bClient && item.iClient == client)
|
||||
{
|
||||
item.iOwner = INVALID_ENT_REFERENCE;
|
||||
item.iClient = INVALID_ENT_REFERENCE;
|
||||
|
||||
Call_StartForward(g_hFwd_OnClientItemDisconnect);
|
||||
Call_PushCell(client);
|
||||
@ -396,9 +396,9 @@ public void OnClientDeath(Event hEvent, const char[] sEvent, bool bDontBroadcast
|
||||
{
|
||||
CItem item = g_hArray_Items.Get(index);
|
||||
|
||||
if (item.bOwner && item.iOwner == client)
|
||||
if (item.bClient && item.iClient == client)
|
||||
{
|
||||
item.iOwner = INVALID_ENT_REFERENCE;
|
||||
item.iClient = INVALID_ENT_REFERENCE;
|
||||
|
||||
Call_StartForward(g_hFwd_OnClientItemDeath);
|
||||
Call_PushCell(client);
|
||||
@ -422,7 +422,7 @@ public Action OnWeaponPickup(int client, int weapon)
|
||||
|
||||
if (item.bWeapon && item.iWeapon == weapon)
|
||||
{
|
||||
item.iOwner = client;
|
||||
item.iClient = client;
|
||||
|
||||
Call_StartForward(g_hFwd_OnClientItemPickup);
|
||||
Call_PushCell(client);
|
||||
@ -448,7 +448,7 @@ public Action OnWeaponDrop(int client, int weapon)
|
||||
|
||||
if (item.bWeapon && item.iWeapon == weapon)
|
||||
{
|
||||
item.iOwner = INVALID_ENT_REFERENCE;
|
||||
item.iClient = INVALID_ENT_REFERENCE;
|
||||
|
||||
Call_StartForward(g_hFwd_OnClientItemDrop);
|
||||
Call_PushCell(client);
|
||||
@ -477,7 +477,7 @@ public Action OnButtonPress(int button, int client)
|
||||
CItem item = g_hArray_Items.Get(index);
|
||||
|
||||
if ((item.bButton && item.iButton == button) &&
|
||||
(item.bOwner && item.iOwner == client))
|
||||
(item.bClient && item.iClient == client))
|
||||
{
|
||||
Action aResult;
|
||||
Call_StartForward(g_hFwd_OnClientItemCanActivate);
|
||||
|
@ -37,7 +37,7 @@ public void OnGameFrame()
|
||||
{
|
||||
CItem item = EW_GetItemData(index);
|
||||
|
||||
if (item.dConfig.bDisplayInterface && item.bOwner)
|
||||
if (item.dConfig.bDisplayInterface && item.bClient)
|
||||
{
|
||||
char sItemShort[32];
|
||||
item.dConfig.GetShort(sItemShort, sizeof(sItemShort));
|
||||
@ -48,22 +48,22 @@ public void OnGameFrame()
|
||||
{
|
||||
if (item.iTimeReady > RoundToCeil(GetEngineTime()))
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d]: %N", sItemShort, item.iTimeReady - RoundToCeil(GetEngineTime()), item.iOwner);
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d]: %N", sItemShort, item.iTimeReady - RoundToCeil(GetEngineTime()), item.iClient);
|
||||
}
|
||||
else
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%s]: %N", sItemShort, "R", item.iOwner);
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%s]: %N", sItemShort, "R", item.iClient);
|
||||
}
|
||||
}
|
||||
case MODE_MAXUSES:
|
||||
{
|
||||
if (item.iTimesUsed < item.dConfig.iMaxUses)
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d/%d]: %N", sItemShort, item.iTimesUsed, item.dConfig.iMaxUses, item.iOwner);
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d/%d]: %N", sItemShort, item.iTimesUsed, item.dConfig.iMaxUses, item.iClient);
|
||||
}
|
||||
else
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%s]: %N", sItemShort, "D", item.iOwner);
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%s]: %N", sItemShort, "D", item.iClient);
|
||||
}
|
||||
}
|
||||
case MODE_COOLDOWNMAXUSES:
|
||||
@ -72,32 +72,32 @@ public void OnGameFrame()
|
||||
{
|
||||
if (item.iTimeReady > RoundToCeil(GetEngineTime()))
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d]: %N", sItemShort, item.iTimeReady - RoundToCeil(GetEngineTime()), item.iOwner);
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d]: %N", sItemShort, item.iTimeReady - RoundToCeil(GetEngineTime()), item.iClient);
|
||||
}
|
||||
else
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d/%d]: %N", sItemShort, item.iTimesUsed, item.dConfig.iMaxUses, item.iOwner);
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d/%d]: %N", sItemShort, item.iTimesUsed, item.dConfig.iMaxUses, item.iClient);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%s]: %N", sItemShort, "D", item.iOwner);
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%s]: %N", sItemShort, "D", item.iClient);
|
||||
}
|
||||
}
|
||||
case MODE_COOLDOWNCHARGES:
|
||||
{
|
||||
if (item.iTimeReady > RoundToCeil(GetEngineTime()))
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d]: %N", sItemShort, item.iTimeReady - RoundToCeil(GetEngineTime()), item.iOwner);
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d]: %N", sItemShort, item.iTimeReady - RoundToCeil(GetEngineTime()), item.iClient);
|
||||
}
|
||||
else
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d/%d]: %N", sItemShort, item.iTimesUsed, item.dConfig.iMaxUses, item.iOwner);
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%d/%d]: %N", sItemShort, item.iTimesUsed, item.dConfig.iMaxUses, item.iClient);
|
||||
}
|
||||
}
|
||||
default:
|
||||
{
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%s]: %N", sItemShort, "N/A", item.iOwner);
|
||||
Format(sHUDBuffer, sizeof(sHUDBuffer), "%s [%s]: %N", sItemShort, "N/A", item.iClient);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user