|
From: <yu...@us...> - 2003-11-15 20:48:10
|
Update of /cvsroot/timewarp/source/games/triggers
In directory sc8-pr-cvs1:/tmp/cvs-serv2688/source/games/triggers
Modified Files:
trcontrol.h trtest.cpp trtest.h
Log Message:
Fixed not virtual destructor bugs.
Fixed uninitialized varriable use bugs.
Fixed calculation damage in one of the ships
Index: trcontrol.h
===================================================================
RCS file: /cvsroot/timewarp/source/games/triggers/trcontrol.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** trcontrol.h 26 Oct 2003 10:43:17 -0000 1.2
--- trcontrol.h 15 Nov 2003 20:48:07 -0000 1.3
***************
*** 12,15 ****
--- 12,16 ----
{
public:
+ virtual ~action_func_control(){};
// execution of blocks is handled by this:
action_func *current_action;
***************
*** 30,33 ****
--- 31,35 ----
{
public:
+ virtual ~action_startfunction(){};
action_func *main_ptr;
double timer, timeforaction;
***************
*** 55,58 ****
--- 57,61 ----
{
public:
+ virtual ~action_subr(){};
action_func *block_ptr;
***************
*** 74,77 ****
--- 77,81 ----
{
public:
+ virtual ~action_if(){};
action_func *true_block_ptr, *false_block_ptr;
int *ichoice;
***************
*** 92,95 ****
--- 96,100 ----
{
public:
+ virtual ~action_for(){};
action_func *block_ptr;
int *ivar, *istart, *iend;
***************
*** 113,117 ****
{
public:
!
action_func *level_ptr[max_action_levels];
--- 118,122 ----
{
public:
! virtual ~action_levels(){};
action_func *level_ptr[max_action_levels];
Index: trtest.cpp
===================================================================
RCS file: /cvsroot/timewarp/source/games/triggers/trtest.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** trtest.cpp 26 Oct 2003 10:43:17 -0000 1.2
--- trtest.cpp 15 Nov 2003 20:48:07 -0000 1.3
***************
*** 628,632 ****
void action_vars_str::set_id(char vartype, int i, char *id)
{
! char *trg;
switch (vartype)
--- 628,632 ----
void action_vars_str::set_id(char vartype, int i, char *id)
{
! char *trg = NULL;
switch (vartype)
***************
*** 641,644 ****
--- 641,647 ----
trg = strvarid[i];
break;
+ default:
+ ASSERT(0&&"trg is not valid");
+ break;
}
Index: trtest.h
===================================================================
RCS file: /cvsroot/timewarp/source/games/triggers/trtest.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** trtest.h 26 Oct 2003 10:43:17 -0000 1.2
--- trtest.h 15 Nov 2003 20:48:07 -0000 1.3
***************
*** 17,21 ****
action_func();
! ~action_func();
virtual void insert(action_func *a, action_func *b);
--- 17,21 ----
action_func();
! virtual ~action_func();
virtual void insert(action_func *a, action_func *b);
***************
*** 141,145 ****
ActionID();
! ~ActionID();
action_func *action[maxactions];
--- 141,145 ----
ActionID();
! virtual ~ActionID();
action_func *action[maxactions];
|