Beispiel #1
0
// Explicit server command to remove a view from the client's snapshot
void CG_mvDelete_f(void)
{
	if (cg.demoPlayback)
	{
		return;
	}
	else
	{
		int pID = -1;

		if (trap_Argc() > 1)
		{
			char aName[64];

			trap_Args(aName, sizeof(aName));
			pID = CG_findClientNum(aName);
		}
		else
		{
			cg_window_t *w = cg.mvCurrentActive;

			if (w != NULL)
			{
				pID = (w->mvInfo & MV_PID);
			}
		}

		if (pID >= 0 && CG_mvMergedClientLocate(pID))
		{
			trap_SendClientCommand(va("mvdel %d\n", pID));
		}
	}
}
Beispiel #2
0
// Explicit server command to add a view to the client's snapshot
void CG_mvNew_f(void)
{
    if(cg.demoPlayback || trap_Argc() < 2) return;
    else {
        int pID;
        char aName[64];

        trap_Args(aName, sizeof(aName));
        pID = CG_findClientNum(aName);

        if(pID >= 0 && !CG_mvMergedClientLocate(pID)) {
            trap_SendClientCommand(va("mvadd %d\n", pID));
        }
    }
}