Rune Central

The Official Rune Quake Message Board
It is currently Sat Dec 21, 2024 12:54 pm

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Grenade counter filter
PostPosted: Wed Feb 07, 2007 2:54 pm 
Offline

Joined: Tue Jul 20, 2004 4:36 am
Posts: 40
Location: Sweden
Hey, how about an in-game grenade counter filter that could be activated while playing demos? Something like, cl_grenadecounterfilter? Could be good when watching demos from somebody who hasn't bothered to remove the counter before sending in to SDA :)

It's only an idea I got just now :D


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Mar 24, 2007 6:27 am 
Offline

Joined: Tue Jul 20, 2004 4:36 am
Posts: 40
Location: Sweden
I tried this for myself for fun, here's some code. It went into gl_screen.c which must be a mistake...

At the top of the file:

Code:
cvar_t       cl_grencounterfilter = {"cl_grencounterfilter", "0"};


Inside SCR_CenterPrint:

Code:
    // grenade counter filter
    if (cls.demoplayback) {
        if (cl_grencounterfilter.value != 0) {
            if (!strncmp(str, "Grenade ", 8) || !strncmp(str, "Ogre-Grenade", 12)) {
                scr_center_lines = 0;
                return;
            }
        }
    }


And in SCR_Init:

Code:
Cvar_Register (&cl_grencounterfilter);


You don't have to use it but it seems pretty handy for when we get demos from Basil 8)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 44 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group