patchWarzone 2100 Project - Patches: patch #977, Adds a new showorders debug/cheat

 
 
Show feedback again

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

patch #977: Adds a new showorders debug/cheat

Submitted by:  Bugs Buggy <buginator>
Submitted on:  Tue 12 Feb 2008 06:02:15 AM UTC  
 
Category: FeaturePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Planned Release: None

Thu 14 Feb 2008 04:37:42 AM UTC, comment #3:

ok, changed it to use snprintf.
For the memset vs strcpy, never thought of it really.

As to the why those are needed, the 'showorders' is always active. So you can monitor the unit in question. When you deselect the unit, then you don't want to print the old string again.
There are 2 of them needed, one is for your units, and the other one is for when you want to spy on the enemy AI units, and again, once you deselect them, we clear the string.

(file #3825)

Bugs Buggy <buginator>
Project Administrator
Tue 12 Feb 2008 07:26:33 PM UTC, comment #2:

The remainder of this patch.

It needs some changes IMO; e.g. instead of using memset(X, 0, sizeof(X)) you can use strcpy(X, "").

And the sprintf really should be replace by snprintf.

More importantly though: Why do you do those memset(0)s at all (display.c) ?

(file #3805)

Giel van Schijndel <muggenhor>
Project Member
Tue 12 Feb 2008 07:16:54 PM UTC, SVN revision 3767:

When selecting a droid (in debug mode) don't display the order and action numbers, instead display their textual representation; part of patch #977 by Buginator, slightly changed by me (wrapped the string-arrays in functions)

(Browse SVN revision 3767)

Giel van Schijndel <muggenhor>
Project Member
Tue 12 Feb 2008 06:02:15 AM UTC, original submission:

This will show you the order & action of the selected unit, so you can see what it is doing.

Helpful for debugging units that are doing seemingly strange things.
This is a realtime display of their order & action, it is displayed after you enter the debug code of 'showorders'.
The old method of clicking on the unit is also updated to show the actual order & action text instead of just the cryptic #. You just don't have to keep clicking on the unit anymore.

Feedback is welcomed. :)

Bugs Buggy <buginator>
Project Administrator

 

Attached Files
file #3825:  showorders2b.patch added by buginator (5kB - text/x-diff)
file #3805:  showorders2.patch added by muggenhor (4kB - text/x-patch)
file #3804:  showorders.patch added by buginator (11kB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by muggenhor (Updated the item)
  • -unavailable- added by buginator (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 14 Feb 2008 04:37:42 AM UTCbuginatorAttached File-=>Added showorders2b.patch, #3825
    Tue 12 Feb 2008 07:26:32 PM UTCmuggenhorAttached File-=>Added showorders2.patch, #3805
    Tue 12 Feb 2008 06:02:15 AM UTCbuginatorAttached File-=>Added showorders.patch, #3804
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup