Backwards running clock?
Moderator: InsideQC Admins
7 posts
• Page 1 of 1
Backwards running clock?
CRMOD and a few other deathmatch mods run the clock backwards.
For instance, at the beginning of a match the clock might show 20:00 and runs down to 0.
How is it possible to have the time on a server be reversed?
For instance, at the beginning of a match the clock might show 20:00 and runs down to 0.
How is it possible to have the time on a server be reversed?
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
The time isn't reversed. They have a separate timer, which starts with a value, and gets decreased each frame with frametime, or perhaps a think function every second which subtracts a second from it.
Don't mess with the server time
Don't mess with the server time
I was once a Quake modder
-

Urre - Posts: 1109
- Joined: Fri Nov 05, 2004 2:36 am
- Location: Moon
Or maybe a simple arithmetic: sv_timelimit - current time ?
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
metlslime wrote:ceriux wrote:if (time == time +1);
Damn I LOL'd so loud my boss just stared at me
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
- Code: Select all
void (entity e, float m, float s) pqc_match_time =
{
local float msg_type;
if (e == world)
msg_type = MSG_ALL;
else
{
msg_entity = e;
msg_type = MSG_ONE;
}
WriteByte (msg_type, SVC_STUFFCMD);
WriteByte (msg_type, 1);
WriteByte (msg_type, PQC_MATCH_TIME);
WriteBytePQ (msg_type, m);
WriteBytePQ (msg_type, s);
WriteString (msg_type, string_null);
};
this is what the quakeC side of pq_timer 1 looks like.
- r00k
- Posts: 1110
- Joined: Sat Nov 13, 2004 10:39 pm
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
