Author Topic: Hide compass on killcam  (Read 1938 times)

Offline alyosha

  • Rank: Private
  • *
  • Posts: 203
Hide compass on killcam
« on: January 07, 2010, 09:16:16 am »
Hi, is possible to hide the compass during the killcam? Because in CTF,  looking the compass on killcam is possible know where is your flag.

Offline PatmanSan

  • Administrator
  • Rank: Private
  • *****
  • Posts: 2527
Re: Hide compass on killcam
« Reply #1 on: January 07, 2010, 03:00:35 pm »
Not the entire compass, but you can hide the objectives.
You will have to update the client iwd for this, so new downloads for players.

Extract ui_mp\hud.menu from the iwd.

Locate this:

Code: [Select]
itemDef // Objective pointers
{
name "compasspointers"
decoration
visible MENU_TRUE
rect 0 0 COMPASS_SIZE COMPASS_SIZE
forecolor 1.0 1.0 1.0 1.0
ownerdraw CG_PLAYER_COMPASS_POINTERS
}

Make it look like this:

Code: [Select]
itemDef // Objective pointers
{
name "compasspointers"
decoration
visible MENU_TRUE
rect 0 0 COMPASS_SIZE COMPASS_SIZE
forecolor 1.0 1.0 1.0 1.0
ownerdraw CG_PLAYER_COMPASS_POINTERS
dvartest "ui_hide_pointers"
hideDvar { "1" }
}

Save and place back in iwd. Upload to server (and download redirect).


Open maps\mp\gametypes\_killcam.gsc

Look for this (starting at line 39 in v2.5):

Code: [Select]
killcam(attackerNum, delay, offsetTime, respawn)
{
self endon("spawned");

// killcam
if(attackerNum < 0)
return;

self.sessionstate = "spectator";
self.spectatorclient = attackerNum;
self.archivetime = delay + 7;
self.psoffsettime = offsetTime;

Make it look like this:

Code: [Select]
killcam(attackerNum, delay, offsetTime, respawn)
{
self endon("spawned");

// killcam
if(attackerNum < 0)
return;

self setClientCvar("ui_hide_pointers", 1);

self.sessionstate = "spectator";
self.spectatorclient = attackerNum;
self.archivetime = delay + 7;
self.psoffsettime = offsetTime;

Look for this (starting at line 210 in v2.5):

Code: [Select]
removeKillcamElements()
{
if(isDefined(self.kc_topbar))
self.kc_topbar destroy();
if(isDefined(self.kc_bottombar))
self.kc_bottombar destroy();
if(isDefined(self.kc_title))
self.kc_title destroy();
if(isDefined(self.kc_skiptext))
self.kc_skiptext destroy();
if(isDefined(self.kc_timer))
self.kc_timer destroy();
}

Make it look like this:

Code: [Select]
removeKillcamElements()
{
self setClientCvar("ui_hide_pointers", 0);

if(isDefined(self.kc_topbar))
self.kc_topbar destroy();
if(isDefined(self.kc_bottombar))
self.kc_bottombar destroy();
if(isDefined(self.kc_title))
self.kc_title destroy();
if(isDefined(self.kc_skiptext))
self.kc_skiptext destroy();
if(isDefined(self.kc_timer))
self.kc_timer destroy();
}

Save and upload to server.

This should make all objective pointers disappear during killcam.

Offline alyosha

  • Rank: Private
  • *
  • Posts: 203
Re: Hide compass on killcam
« Reply #2 on: January 09, 2010, 08:12:55 am »
Ok, I will wait the extreme 2.6 for a new downloads for players, the code to will be the same also in 2.6?

p.s. The test server is with release candidate :) the new release is near?

Offline PatmanSan

  • Administrator
  • Rank: Private
  • *****
  • Posts: 2527
Re: Hide compass on killcam
« Reply #3 on: January 09, 2010, 12:53:12 pm »
Yep. Code will be part of v2.6, which is nearly done. Some more testing, small adjustments...