patchWarzone 2100 Project - Patches: patch #1087, Give tanks the ability to drive...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

patch #1087: Give tanks the ability to drive backwards

Submitted by:  Elio Gubser <ohyeh>
Submitted on:  Wed 23 Jul 2008 04:43:16 PM UTC  
 
Category: FeaturePriority: 3 - Low
Status: In ProgressPrivacy: Public
Assigned to: Elio Gubser <ohyeh>Open/Closed: Open
Planned Release: None

Fri 25 Jul 2008 12:48:29 PM UTC, comment #3:

New version of the patch
- using cos/sin from math.h
- isTargetBehind() is now considerMovingBackwards()

i've still problems with sliding and tanks sometimes rotate back and forth, i'll look over it

thanks for testing :)

(file #4630)

Elio Gubser <ohyeh>
Project MemberIn charge of this item.
Thu 24 Jul 2008 04:02:43 PM UTC, comment #2:

In addition to EvilGuru's remarks, please use sin and cos instead of trigSin and trigCos respectively. As we eventually want to get rid of the trig.* functions (which will be easier if they're not used).

Additionally you have an unused variable in function isTargetBehind (`f', which triggers a compiler warning). Further, could you use some more descriptive variable names than `a' and `b'?

Also you might want to make the macro BASE_REVERSE_SPEED_RATIO a "static const float" instead of a macro (as it gets you some additional type safety).

Asside from these comments: I really like this feature and you're implementation of it! (As long as you'll eventually add the performance check you mentioned).

Giel van Schijndel <muggenhor>
Project Member
Thu 24 Jul 2008 03:41:13 PM UTC, comment #1:

I like the idea!

Code could do with a quick pass through astyle so that it conforms with the coding guidelines (if() => if (); always use { } in if statements; const wherever possible, that kind of stuff).

Other than that, no objections from me.

Freddie Witherden <evilguru>
Project Member
Wed 23 Jul 2008 04:43:16 PM UTC, original submission:

With this (simple) patch, tanks can drive backwards.

Currently they change direction every time the target is behind them (+90° -90°). Which can be quiet silly sometimes.
So futur version of this patch will include a performance check wetheter it's better to turn 180° and drive forward than driving backwards.

Elio Gubser <ohyeh>
Project MemberIn charge of this item.

 

Attached Files
file #4630:  reverse2.diff added by ohyeh (6kB - text/x-patch)
file #4619:  reverse1.diff added by ohyeh (2kB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by muggenhor (Posted a comment)
  • -unavailable- added by evilguru (Posted a comment)
  • -unavailable- added by ohyeh (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 25 Jul 2008 12:48:29 PM UTCohyehAttached File-=>Added reverse2.diff, #4630
    Wed 23 Jul 2008 04:43:17 PM UTCohyehAttached File-=>Added reverse1.diff, #4619
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup