From cdda3a943da09feb9a8f73ef2cce9a1520de2df7 Mon Sep 17 00:00:00 2001 From: Steam Deck User Date: Wed, 28 Dec 2022 13:10:44 -0500 Subject: [PATCH] CTR: Enable Achievement Support --- source/server/clientfuncs.qc | 26 ++++++++++++-------------- source/server/dummies/ctr.qc | 5 +---- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/source/server/clientfuncs.qc b/source/server/clientfuncs.qc index 7d83bab..efab7a0 100644 --- a/source/server/clientfuncs.qc +++ b/source/server/clientfuncs.qc @@ -425,19 +425,18 @@ void(string chaptertitle, string location, string date, string person, entity wh #endif #ifndef NX -#ifndef CTR void (float achievement_id, optional entity who) GiveAchievement = { -#ifdef PSP +#ifndef PC // temp if (achievement_id > 4) return; -#endif // PSP +#endif // PC // this is an achievement specific to an individual if ((who && who != world) || player_count == 0) { if (player_count == 0) who = find(world, classname, "player"); -#ifdef PSP +#ifndef PC achievement(who, achievement_id); #else WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET); @@ -445,9 +444,9 @@ void (float achievement_id, optional entity who) GiveAchievement = WriteByte(MSG_MULTICAST, achievement_id); msg_entity = who; multicast('0 0 0', MULTICAST_ONE); -#endif // PSP +#endif // PC } else { -#ifdef PSP +#ifndef PC entity players; players = find(world, classname, "player"); while(players != world) { @@ -459,21 +458,21 @@ void (float achievement_id, optional entity who) GiveAchievement = WriteByte(MSG_MULTICAST, EVENT_ACHIEVEMENT); WriteByte(MSG_MULTICAST, achievement_id); multicast('0 0 0', MULTICAST_ALL); -#endif // PSP +#endif // PC } } void (float achievement_id, float progress_value, optional entity who) UpdateAchievementProgress = { -#ifdef PSP +#ifndef PC // temp if (achievement_id > 4) return; -#endif // PSP +#endif // PC // this is a progress update specific to an individual if ((who && who != world) || player_count == 0) { if (player_count == 0) who = find(world, classname, "player"); -#ifdef PSP +#ifndef PC //achievement_progress(who, achievement_id, progress_value); #else WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET); @@ -482,9 +481,9 @@ void (float achievement_id, float progress_value, optional entity who) UpdateAch WriteFloat(MSG_MULTICAST, progress_value); msg_entity = who; multicast('0 0 0', MULTICAST_ONE); -#endif // PSP +#endif // PC } else { -#ifdef PSP +#ifndef PC entity players; players = find(world, classname, "player"); while(players != world) { @@ -497,10 +496,9 @@ void (float achievement_id, float progress_value, optional entity who) UpdateAch WriteByte(MSG_MULTICAST, achievement_id); WriteFloat(MSG_MULTICAST, progress_value); multicast('0 0 0', MULTICAST_ALL); -#endif // PSP +#endif // PC } } -#endif // CTR #endif // NX // ***************************************** diff --git a/source/server/dummies/ctr.qc b/source/server/dummies/ctr.qc index f0898b9..e3a5be7 100644 --- a/source/server/dummies/ctr.qc +++ b/source/server/dummies/ctr.qc @@ -32,7 +32,4 @@ void LoadWaypointData() = {}; .float MaxRange; float gotdog; -void(string chaptertitle, string location, string date, string person, entity who) WorldText = {}; - -void GiveAchievement(float achievement_id, optional entity who) = {}; - +void(string chaptertitle, string location, string date, string person, entity who) WorldText = {}; \ No newline at end of file