Erwan
-removing unpackDamageStack/repackDamageStack obsolete functions
This commit is contained in:
@@ -133,10 +133,11 @@ class ActionStack :public GuiLayer{
|
|||||||
int mode;
|
int mode;
|
||||||
int checked;
|
int checked;
|
||||||
|
|
||||||
|
/*
|
||||||
void unpackDamageStacks();
|
void unpackDamageStacks();
|
||||||
void unpackDamageStack(DamageStack * ds);
|
void unpackDamageStack(DamageStack * ds);
|
||||||
void repackDamageStacks();
|
void repackDamageStacks();
|
||||||
|
*/
|
||||||
public:
|
public:
|
||||||
|
|
||||||
enum{
|
enum{
|
||||||
|
|||||||
@@ -443,6 +443,7 @@ int ActionStack::resolve(){
|
|||||||
action->state = RESOLVED_NOK;
|
action->state = RESOLVED_NOK;
|
||||||
}
|
}
|
||||||
if (action->type == ACTION_DAMAGE) ((Damage * )action)->target->afterDamage();
|
if (action->type == ACTION_DAMAGE) ((Damage * )action)->target->afterDamage();
|
||||||
|
/*
|
||||||
if (action->type == ACTION_DAMAGES){
|
if (action->type == ACTION_DAMAGES){
|
||||||
DamageStack * ds = (DamageStack *) action;
|
DamageStack * ds = (DamageStack *) action;
|
||||||
for (int i = 0; i < ds->mCount; i++){
|
for (int i = 0; i < ds->mCount; i++){
|
||||||
@@ -452,7 +453,7 @@ int ActionStack::resolve(){
|
|||||||
unpackDamageStack(ds);
|
unpackDamageStack(ds);
|
||||||
ds->mCount = 0;
|
ds->mCount = 0;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if (!getNext(NULL,NOT_RESOLVED)){
|
if (!getNext(NULL,NOT_RESOLVED)){
|
||||||
for (int i = 0; i< 2 ; i++){
|
for (int i = 0; i< 2 ; i++){
|
||||||
interruptDecision[i] = 0;
|
interruptDecision[i] = 0;
|
||||||
@@ -527,6 +528,7 @@ Interruptible * ActionStack::getLatest(int state){
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
void ActionStack::unpackDamageStack(DamageStack * ds){
|
void ActionStack::unpackDamageStack(DamageStack * ds){
|
||||||
for (int j = 0; j < ds->mCount; j++){
|
for (int j = 0; j < ds->mCount; j++){
|
||||||
Damage * damage = ((Damage *)ds->mObjects[j]);
|
Damage * damage = ((Damage *)ds->mObjects[j]);
|
||||||
@@ -571,7 +573,7 @@ void ActionStack::repackDamageStacks(){
|
|||||||
if (!found) ++iter;
|
if (!found) ++iter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
void ActionStack::Update(float dt){
|
void ActionStack::Update(float dt){
|
||||||
askIfWishesToInterrupt = NULL;
|
askIfWishesToInterrupt = NULL;
|
||||||
//modal = 0;
|
//modal = 0;
|
||||||
@@ -584,7 +586,7 @@ void ActionStack::Update(float dt){
|
|||||||
//Select Stack's display mode
|
//Select Stack's display mode
|
||||||
if (mode==ACTIONSTACK_STANDARD && tc && !checked){
|
if (mode==ACTIONSTACK_STANDARD && tc && !checked){
|
||||||
checked = 1;
|
checked = 1;
|
||||||
unpackDamageStacks();
|
//unpackDamageStacks();
|
||||||
for (int i = 0; i < mCount ; i++){
|
for (int i = 0; i < mCount ; i++){
|
||||||
Interruptible * current = (Interruptible *)mObjects[i];
|
Interruptible * current = (Interruptible *)mObjects[i];
|
||||||
if (tc->canTarget(current)){
|
if (tc->canTarget(current)){
|
||||||
@@ -599,12 +601,12 @@ void ActionStack::Update(float dt){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mode != ACTIONSTACK_TARGET){
|
if (mode != ACTIONSTACK_TARGET){
|
||||||
repackDamageStacks();
|
//repackDamageStacks();
|
||||||
}
|
}
|
||||||
}else if (mode==ACTIONSTACK_TARGET && !tc){
|
}else if (mode==ACTIONSTACK_TARGET && !tc){
|
||||||
mode = ACTIONSTACK_STANDARD;
|
mode = ACTIONSTACK_STANDARD;
|
||||||
checked = 0;
|
checked = 0;
|
||||||
repackDamageStacks();
|
//repackDamageStacks();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode == ACTIONSTACK_STANDARD){
|
if (mode == ACTIONSTACK_STANDARD){
|
||||||
|
|||||||
Reference in New Issue
Block a user