Project Bugfix


(Chruker) #21

I finally got the bugfixes ported into the 2.60 SDK. Most of the bugfixes comments have been updated. Some of the bugfixes previously marked fixed, has turned out not to be fixed.

Also there are two new ones:
http://games.chruker.dk/enemy_territory/modding_project_bugfix.php?bug_id=071 Objective icon not shown when the scoreboard is compact.
http://games.chruker.dk/enemy_territory/modding_project_bugfix.php?bug_id=072 Objective icon causing the class, xp, ping and lives text to be offset.


(SCDS_reyalP) #22

http://games.chruker.dk/enemy_territory/modding_project_bugfix.php?bug_id=045
Seems debatable to me. Since (without using /give all) you never have akimbos without already having level 3 lw, you could argue that was the intended spread for them at level3. Certainly, checking the light weapon skill is pointless.


(ensiform) #23

Cmd_Where_f is broken …

Replace the trap inside it with this:

trap_SendServerCommand( ent-g_entities, va("print \"%s
\"", vtos( ent->r.currentOrigin ) ) );

it was getting the origin of where u spawned i believe not your current origin. this bug exists in all q3 engine games with this cmd :stuck_out_tongue:

edit from above: i didnt have my dlls in a pk3 therefore it was overwriting my client and ui dll :slight_smile: so sounds dont play anymore.

question: why does the sprint bar go down when u use sprint in water when it doesnt affect u in the water?


(ensiform) #24

Bug17:

This part:

Q_strcat( buffer, 1024, va( ";%s; %i ", best && best->sess.skillpoints[XX] >= 20 ? best->pers.netname : "", best && best->sess.skillpoints[XX] >= 20 ? best->sess.sessionTeam : -1 ) )

where

 && best->sess.skillpoints[XX] >= 20

has to be removed twice causes the following errors for me …

c:\Et_sdk\src\game\g_stats.c(637): error C2059: syntax error : ‘<Unknown>’
c:\Et_sdk\src\game\g_stats.c(637): error C2059: syntax error : ‘,’
c:\Et_sdk\src\game\g_stats.c(637): error C2143: syntax error : missing ‘)’ before ‘constant’
c:\Et_sdk\src\game\g_stats.c(637): warning C4202: nonstandard extension used : ‘…’: prototype parameter in name list illegal
c:\Et_sdk\src\game\g_stats.c(637): error C2143: syntax error : missing ‘{’ before ‘constant’

any help please ?


(KillerWhale) #25

&& best->sess.skillpoints[XX] >= 20

is marked in red on the page which means it’s old code that must be deleted.


(Chruker) #26

ensiform: I’m not sure why you get that error. Could you perhaps post your edited line?

This is what mine looks like after it has been edited:

	Q_strcat( buffer, 1024, va( ";%s; %i ", best ? best->pers.netname : "", best ? best->sess.sessionTeam : -1 ) )


(ensiform) #27

heres a few different ones i tried:

Q_strcat( buffer, 1024, va( ";%s; %i ", best ? best->pers.netname : "", best ? best->sess.sessionTeam : -1 ) )

Q_strcat( buffer, 1024, va( ";%s; %i ", best ? best->pers.netname, best ? best->sess.sessionTeam : -1 ) )

This is the one that u just posted above … i copy / pasted that and it somehow worked and it looks exactly the same as one of the 2 i tried …

Q_strcat( buffer, 1024, va( ";%s; %i ", best ? best->pers.netname : "", best ? best->sess.sessionTeam : -1 ) )

i knew that … but removing it was causing the errors.


(Chruker) #28

It is strange. Your first one should have worked.


(tjw) #29

Actually this is OK since it could be intentional in order to round the float down to the nearest whole number.

The real problem in PM_AdjustAimSpreadScale is this:


viewchange += fabs( SHORT2ANGLE(pm->cmd.angles[i]) - SHORT2ANGLE(pm->oldcmd.angles[i]) );  

  1. that should use AngleSubtract() instead of -
  2. cmd.angles are not normalized and are often > 65536. this creates huge values for viewchange sporadically when that calculation thinks you changed the angle > 360 degrees when you may have only changed 1.

See: http://linespeed.net/projects/etpub/changeset/518


(SCDS_reyalP) #30

Uh no it isn’t. Please look at what it actually does at different FPS.

Also, there is no reason to round it down at that point.

edit:
You are of course right about the problems with viewangles. Good catch.


(uber_noob) #31

I think I got it working with an (ugly) solution (at least the pulse and the bar seem to react normal when using cg.predictedPlayerState.aimSpreadScale):

In cg_snapshot.c:CG_TransitionSnapshot around line 259 do the following to set the aimSpreadScaleFloat:


// move nextSnap to snap and do the transitions
oldFrame = cg.snap;
cg.snap = cg.nextSnap;
// try to delag the crosshair pulse
cg.snap->ps.aimSpreadScaleFloat = (float)cg.snap->ps.aimSpreadScale;

Then use cg.predictedPlayerState.aimSpreadScale instead of cg.snap->ps.aimSpreadScale for the pulse and the bar. If you have a better solution please post it.


(ensiform) #32

Chrunker, you should add the if gamedll thing to the underwater sound like this to your underwater bugfix:

http://linespeed.net/projects/etpub/changeset/499


(bani) #33

good find on the non normalized cmd.angles bug.

it will happen every time you yaw (or pitch!) across zero.

a faster/simpler way to normalize:

int ShortAngleNormalize( int angle ) {
        return angle % 65536;
}

(jaybird) #34

ETPub is a server-side mod, so in that instance, it is necessary (well, necessary as long as you’re compiling the client-side code at the same time). Also, the define he’s checking against is a server-side cvar. Since that portion of the code is without regard to client code, you must wrap it with ifdef gamedll…

However, when making a non-server-side mod, Chruker’s code works perfectly. That code is run by both games, so it gets predicted correctly. If you had it wrapped with the gamedll check, you would still hear clicking when you used pliers or a syringe underwater, since the client code would still be predicting that behavior.


(ensiform) #35

right thats why i was suggesting cause the sound is annoying when it should be working :slight_smile:


(jaybird) #36

Perhaps you’re not understanding what I said above. With the “fix” that Chruker has, it is not necessary to wrap that statement with ifdef GAMEDLL. The if statement above it completely rules out those weapons from running the event that causes the sound. Unless you’re doing something special, you will not need that at all.


(Catscratch) #37

Here’s a bug I think you missed, Chruker. With center print, colors are lost from text when it returns to the next line. Like when it says “Whoever has become an admin,” the last few words are white on the next line instead of yellow. I hope that makes sense.


(Chruker) #38

I have added a few to the list:
http://games.chruker.dk/enemy_territory/modding_project_bugfix.php?bug_id=073 - Bot code cleanups 2
http://games.chruker.dk/enemy_territory/modding_project_bugfix.php?bug_id=074 - Server side cleanups 2
http://games.chruker.dk/enemy_territory/modding_project_bugfix.php?bug_id=075 - Client side cleanups 1
http://games.chruker.dk/enemy_territory/modding_project_bugfix.php?bug_id=076 - Scoreboard background draws double lines with higher resolutions
http://games.chruker.dk/enemy_territory/modding_project_bugfix.php?bug_id=077 - Player highlighting on the scoreboard was split into columns
http://games.chruker.dk/enemy_territory/modding_project_bugfix.php?bug_id=078 - Medic, death and objective icons on the scoreboard are drawn too big
http://games.chruker.dk/enemy_territory/modding_project_bugfix.php?bug_id=079 - Background images on the loading screen are not always shown


(Chruker) #39

When I was implementing xp save controlled by a cvar I discovered a few more bugs in the USEXPSTORAGE code:

  • The tiny bug described in server side cleanups 2
  • sess.startskillpoints and sess.startxptotal are not reset to the value read from the xp storage, this can lead to people reconnecting and getting the awards and medals they shouldn’t have been awarded.
  • Worst bug is that on first time connects the value loaded from the storage is overwritten by the session value if the map is restarted during the connect. Resulting in people losing their XP.

(Chruker) #40

I’ve added one more:
http://games.chruker.dk/enemy_territory/modding_project_bugfix.php?bug_id=080 - Breakable damage indicator can wrap when the entity has a lot of health