~ubuntu-branches/debian/squeeze/warzone2100/squeeze

« back to all changes in this revision

Viewing changes to src/droid.c

  • Committer: Bazaar Package Importer
  • Author(s): Paul Wise
  • Date: 2010-08-05 21:08:56 UTC
  • mfrom: (1.4.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100805210856-qolydu7ht9w8u3rd
Tags: 2.3.3-1
* New upstream bugfix release
  - Fixes issues in 2.3.2 (Closes: #591215)
  - Upstream community renamed, update copyright information 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
        This file is part of Warzone 2100.
3
3
        Copyright (C) 1999-2004  Eidos Interactive
4
 
        Copyright (C) 2005-2009  Warzone Resurrection Project
 
4
        Copyright (C) 2005-2010  Warzone 2100 Project
5
5
 
6
6
        Warzone 2100 is free software; you can redistribute it and/or modify
7
7
        it under the terms of the GNU General Public License as published by
942
942
                        else
943
943
                        {
944
944
                                // do burn damage
945
 
                                damageToDo = MAX(BURN_DAMAGE - psDroid->armour[HIT_SIDE_FRONT][WC_HEAT], BURN_DAMAGE/3) * ((SDWORD)gameTime - (SDWORD)psDroid->burnStart) /
 
945
                                damageToDo = MAX(BURN_DAMAGE - (int32_t)psDroid->armour[HIT_SIDE_FRONT][WC_HEAT], BURN_DAMAGE/3) * ((SDWORD)gameTime - (SDWORD)psDroid->burnStart) /
946
946
                                                                GAME_TICKS_PER_SEC;
947
947
                                damageToDo -= (SDWORD)psDroid->burnDamage;
948
948
                                if (damageToDo > 20) // enough that DR takes effect
950
950
                                        damageToDo -= (damageToDo % 20); // make deterministic
951
951
                                        psDroid->burnDamage += damageToDo;
952
952
 
953
 
                                        //just assume the burn damage is from FRONT
 
953
                                        // HIT_SIDE_PIERCE because armor from burn effects is handled externally
 
954
                                        // To be consistent with vehicle burn, all burn damage is thermal flame damage
954
955
                                        droidDamage(psDroid, damageToDo, WC_HEAT,WSC_FLAME, HIT_SIDE_PIERCE);
955
956
                                }
956
957
                        }