mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-20 23:23:35 +00:00
Spectator Role (#1200)
* reorganized files and methods for session actor in preparation for custom spectator implementation * split existing code between data and functions, and entry points; parsing and logic management is now handled within the current game mode, which should reduce the need to ask explicits * should fix players not performing damage after being broken for an unknown amount of time, maybe never working correctly * functioning spectator mode logic swap; initial packets for UplinkRequest, UplinkResponse, and UplinkPositionEvent * available chat prompts can now be different based on player mode without testing flags * modified ChatActor to be replaced by a function-data logic pair, and modified ChatService to be able to accommodate the new chat channel; chat packet handling moved from general operations to the new chat operations * resolved issues with spectator implants, at least enough that implants should be stable; created an exclusive permission for spectator mode; database changes to persist permissions for different modes * command detonater is no longer allowed; spectators now hold a laze pointer * for the purposes of testing, anyone can be a spectator * spectator mode is important to confirm; removed deprecated chat actor; dismount quietly * oops; allowed again * restored commands setbr and setcr; deployables are erased from spectator map; projectiles destruction only just in case * role only for those who are permitted
This commit is contained in:
parent
21637108c2
commit
426ab84f0a
64 changed files with 14058 additions and 8917 deletions
30
server/src/main/resources/db/migration/V013__Spectator.sql
Normal file
30
server/src/main/resources/db/migration/V013__Spectator.sql
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/* Original: V008__Scoring.sql, overrode by V011__ScoringPatch2.sql */
|
||||
CREATE OR REPLACE FUNCTION fn_assistactivity_updateRelatedStats()
|
||||
RETURNS TRIGGER
|
||||
AS
|
||||
$$
|
||||
DECLARE killerSessionId Int;
|
||||
DECLARE killerId Int;
|
||||
DECLARE weaponId Int;
|
||||
DECLARE out integer;
|
||||
BEGIN
|
||||
killerId := NEW.killer_id;
|
||||
weaponId := NEW.weapon_id;
|
||||
killerSessionId := proc_sessionnumber_get(killerId);
|
||||
out := proc_weaponstatsession_addEntryIfNoneWithSessionId(killerId, weaponId, killerSessionId);
|
||||
BEGIN
|
||||
UPDATE weaponstatsession
|
||||
SET assists = assists + 1
|
||||
WHERE avatar_id = killerId AND weapon_id = weaponId AND session_id = killerSessionId;
|
||||
END;
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
/* New */
|
||||
CREATE TABLE IF NOT EXISTS "avatarmodepermission" (
|
||||
"avatar_id" INT NOT NULL REFERENCES avatar (id),
|
||||
"can_spectate" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
"can_gm" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
UNIQUE(avatar_id)
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue