Enemy Territory

Project: Bug Fix

The objective

The goal of this project is to provide modders in the ET community with a SDK code base that contains fixes for various bugs which are present in the stock etmain game (version 2.60).

26th september 2006: Sadly bugfix 088 had a bug :-( There were 3 lines that should have been deleted for the fix to work correctly.

Show index
Previous bug: Serverlist wraps
Next bug: Helmet insignias glowed in the dark

Bugfix 085 - Compass icons were offset when zooming in or out

Problem:

Player icons on the compass command map are offset when you zoom out or zoom in. This is because the icon_size subtracted during the position calculation, wasn't scaled to match the zoom level.

Solution:

Scale the icon_size

2.60 Code

cg_commandmap.c @ 461 } if( scissor ) {
// CHRUKER: b085 - Compass icons were offset when zooming in or out
icon_pos[0] = mEnt->automapTransformed[0] - scissor->tl[0] + x - (icon_size * (scissor->zoomFactor / 5.159)); icon_pos[1] = mEnt->automapTransformed[1] - scissor->tl[1] + y - (icon_size * (scissor->zoomFactor / 5.159)); } else { icon_pos[0] = x + mEnt->transformed[0] - icon_size; icon_pos[1] = y + mEnt->transformed[1] - icon_size;

Show index
Previous bug: Serverlist wraps
Next bug: Helmet insignias glowed in the dark

Color coding

Sample = New code
Sample = Changed code (the new version is what is displayed)
Sample = Deleted code

©2017 Chruker