Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script SAMSARA_ENTER_CLIENT (void) clientside
- {
- int execInt, oExecInt, execStr;
- int pln = PlayerNumber();
- int startTime = Timer();
- // Comment out this line for zdoom
- int cpln = ConsolePlayerNumber();
- execInt = 0; oExecInt = 0;
- while (ClientEnterTimes[pln] == startTime)
- {
- // Also this line
- if (cpln != pln) { Delay(1); continue; }
- if (IsServer)
- {
- array_wolfmove[pln] = !!GetCVar("samsara_cl_wolfmove");
- array_vanillaAnim[pln] = !!GetCVar("samsara_cl_vanilladoom");
- array_ballgag[pln] = !!GetCVar("samsara_cl_ballgag");
- array_weaponBar[pln] = !!GetCVar("samsara_cl_weaponhud");
- array_pickupswitch[pln] = !!GetCVar("switchonpickup");
- }
- else
- {
- oExecInt = execInt;
- execInt = SamsaraClientVars();
- if (execInt != oExecInt)
- {
- execStr = StrParam(s:"puke -", d:SAMSARA_PUKE, s:" ", d:execInt, s:" ", d:pln);
- ConsoleCommand(execStr);
- // This is an ugly, ugly hack. I hate it. But it works.
- }
- }
- Delay(1);
- }
- }
- script SAMSARA_PUKE (int values, int pln) net
- {
- array_wolfmove[pln] = values & 1;
- array_vanillaAnim[pln] = values & 2;
- array_ballgag[pln] = values & 4;
- array_weaponBar[pln] = values & 8;
- array_pickupswitch[pln] = values & 16;
- }
- function int SamsaraClientVars(void)
- {
- int switchOnPickup = !!GetCVar("switchonpickup");
- int weaponBar = !!GetCVar("samsara_cl_weaponhud");
- int ballgag = !!GetCVar("samsara_cl_ballgag");
- int classicAnims = !!GetCVar("samsara_cl_vanilladoom");
- int wolfmove = !!GetCVar("samsara_cl_wolfmove");
- return (switchOnPickup << 4) + (weaponBar << 3) + (ballgag << 2) + (classicAnims << 1) + wolfmove;
- }
- script SAMSARA_SPAWN (int respawning)
- {
- int pln = PlayerNumber();
- int pcount, opcount;
- int startTime = Timer();
- int endloop;
- int canbuddha;
- int wsteSide;
- int armor, oarmor, type, otype;
- int i;
- ServerEnterTimes[pln] = startTime;
- [...]
- while (!endloop && ServerEnterTimes[pln] == startTime)
- {
- if (array_wolfmove[pln]) { GiveInventory("WolfenMovement", 1); }
- else { TakeInventory("WolfenMovement", 0x7FFFFFFF); }
- if (array_ballgag[pln]) { GiveInventory("DukeBallgag", 1); }
- else { TakeInventory("DukeBallgag", 0x7FFFFFFF); }
- [...]
- Delay(1);
- opcount = pcount;
- pcount = PlayerCount();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement