/donate bug on GrangerPub

Thank you, Sam!

The fix would look something like this:

[code]— g_cmds.c 2016-02-13 21:16:09.000000000 +0100
+++ g_cmds.c.new 2016-11-07 22:48:10.201411292 +0100
@@ -4959,7 +4959,8 @@
if( level.clients[ i ].pers.connected == CON_CONNECTED &&
ent->client != level.clients + i &&
level.clients[ i ].pers.teamSelection ==

  •        ent->client->pers.teamSelection ) {
    
  •        ent->client->pers.teamSelection &&
    
  •        level.clients[ i ].pers.credit < max ) {
        new_credits = level.clients[ i ].pers.credit + portion;
        amounts[ i ] = portion;
        totals[ i ] += portion;[/code]
1 Like

Thanks @enneract.

Can you tell if this happens only when everyone on the team is already maxed? if so, maybe should throw a message.

This happens every time a player has over 2000 credits. I think the “everyone is full” case is already covered (the server sends a “donated 0 credits” message, as far as I remember).

This happens whenever you are over 2000 credits and someone donates to you. Any amount over 2000 credits is deleted and you get the message in counsole about -X amount of credits have been donate to you.

For example, I bet enneract had 2780 credits by selling in the armory with 2000 credits in the pocket, he got donated in that moment and lost those 780 credits.

2 Likes

Haha, I missed the negative… ok.

this is an example why i recommended to employ a more expressive set of possible status annotations for describing the status of implementing and testing a feature.

^ That’s a good idea

but I don’t understand what that has to do with my previous post.

1 Like

to me it sounded like u said to have coded, and therein mis-coded, (the relevant version of) the /donate functionality.

nope- I missed the “negative value” in the screenshot.

Would you mind applying the patch already? I’m still losing creds randomly because of this bug.

1 Like