Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/modularships/src/orxonox/worldentities/pawns/Pawn.cc @ 9997

Last change on this file since 9997 was 9997, checked in by noep, 10 years ago

Added functions to print the collisionshape-structure of a Pawn which gets hit. Doesn't quite work yet.

  • Property svn:eol-style set to native
File size: 23.4 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Fabian 'x3n' Landau
24 *   Co-authors:
25 *      Simon Miescher
26 *
27 */
28
29#include "Pawn.h"
30
31#include <algorithm>
32
33#include "core/CoreIncludes.h"
34#include "core/GameMode.h"
35#include "core/XMLPort.h"
36#include "network/NetworkFunction.h"
37
38#include "infos/PlayerInfo.h"
39#include "controllers/Controller.h"
40#include "gametypes/Gametype.h"
41#include "graphics/ParticleSpawner.h"
42#include "worldentities/ExplosionChunk.h"
43#include "worldentities/BigExplosion.h"
44#include "weaponsystem/WeaponSystem.h"
45#include "weaponsystem/WeaponSlot.h"
46#include "weaponsystem/WeaponPack.h"
47#include "weaponsystem/WeaponSet.h"
48#include "sound/WorldSound.h"
49
50#include "controllers/FormationController.h"
51
52#include "collisionshapes/WorldEntityCollisionShape.h"
53
54namespace orxonox
55{
56    RegisterClass(Pawn);
57
58    Pawn::Pawn(Context* context)
59        : ControllableEntity(context)
60        , RadarViewable(this, static_cast<WorldEntity*>(this))
61    {
62        RegisterObject(Pawn);
63
64        this->bAlive_ = true;
65        this->bReload_ = false;
66
67        this->health_ = 0;
68        this->maxHealth_ = 0;
69        this->initialHealth_ = 0;
70
71        this->shieldHealth_ = 0;
72        this->initialShieldHealth_ = 0;
73        this->maxShieldHealth_ = 100; //otherwise shield might increase to float_max
74        this->shieldAbsorption_ = 0.5;
75
76        this->reloadRate_ = 0;
77        this->reloadWaitTime_ = 1.0f;
78        this->reloadWaitCountdown_ = 0;
79
80        this->lastHitOriginator_ = 0;
81
82        // set damage multiplier to default value 1, meaning nominal damage
83        this->damageMultiplier_ = 1;
84
85        this->spawnparticleduration_ = 3.0f;
86
87        this->aimPosition_ = Vector3::ZERO;
88
89        if (GameMode::isMaster())
90        {
91            this->weaponSystem_ = new WeaponSystem(this->getContext());
92            this->weaponSystem_->setPawn(this);
93        }
94        else
95            this->weaponSystem_ = 0;
96
97        this->setRadarObjectColour(ColourValue::Red);
98        this->setRadarObjectShape(RadarViewable::Dot);
99
100        this->registerVariables();
101
102        this->isHumanShip_ = this->hasLocalController();
103
104        this->setSyncMode(ObjectDirection::Bidirectional); // needed to synchronise e.g. aimposition
105
106        if (GameMode::isMaster())
107        {
108            this->explosionSound_ = new WorldSound(this->getContext());
109            this->explosionSound_->setVolume(1.0f);
110        }
111        else
112        {
113            this->explosionSound_ = 0;
114        }
115    }
116
117    Pawn::~Pawn()
118    {
119        if (this->isInitialized())
120        {
121            if (this->weaponSystem_)
122                this->weaponSystem_->destroy();
123        }
124    }
125
126    void Pawn::XMLPort(Element& xmlelement, XMLPort::Mode mode)
127    {
128        SUPER(Pawn, XMLPort, xmlelement, mode);
129
130        XMLPortParam(Pawn, "health", setHealth, getHealth, xmlelement, mode).defaultValues(100);
131        XMLPortParam(Pawn, "maxhealth", setMaxHealth, getMaxHealth, xmlelement, mode).defaultValues(200);
132        XMLPortParam(Pawn, "initialhealth", setInitialHealth, getInitialHealth, xmlelement, mode).defaultValues(100);
133
134        XMLPortParam(Pawn, "shieldhealth", setShieldHealth, getShieldHealth, xmlelement, mode).defaultValues(0);
135        XMLPortParam(Pawn, "initialshieldhealth", setInitialShieldHealth, getInitialShieldHealth, xmlelement, mode).defaultValues(0);
136        XMLPortParam(Pawn, "maxshieldhealth", setMaxShieldHealth, getMaxShieldHealth, xmlelement, mode).defaultValues(100);
137        XMLPortParam(Pawn, "shieldabsorption", setShieldAbsorption, getShieldAbsorption, xmlelement, mode).defaultValues(0);
138
139        XMLPortParam(Pawn, "spawnparticlesource", setSpawnParticleSource, getSpawnParticleSource, xmlelement, mode);
140        XMLPortParam(Pawn, "spawnparticleduration", setSpawnParticleDuration, getSpawnParticleDuration, xmlelement, mode).defaultValues(3.0f);
141        XMLPortParam(Pawn, "explosionchunks", setExplosionChunks, getExplosionChunks, xmlelement, mode).defaultValues(7);
142
143        XMLPortObject(Pawn, WeaponSlot, "weaponslots", addWeaponSlot, getWeaponSlot, xmlelement, mode);
144        XMLPortObject(Pawn, WeaponSet, "weaponsets", addWeaponSet, getWeaponSet, xmlelement, mode);
145        XMLPortObject(Pawn, WeaponPack, "weapons", addWeaponPackXML, getWeaponPack, xmlelement, mode);
146
147        XMLPortParam(Pawn, "reloadrate", setReloadRate, getReloadRate, xmlelement, mode).defaultValues(0);
148        XMLPortParam(Pawn, "reloadwaittime", setReloadWaitTime, getReloadWaitTime, xmlelement, mode).defaultValues(1.0f);
149
150        XMLPortParam(Pawn, "explosionSound",  setExplosionSound,  getExplosionSound,  xmlelement, mode);
151
152        XMLPortParam ( RadarViewable, "radarname", setRadarName, getRadarName, xmlelement, mode );
153    }
154
155    void Pawn::registerVariables()
156    {
157        registerVariable(this->bAlive_,           VariableDirection::ToClient);
158        registerVariable(this->health_,           VariableDirection::ToClient);
159        registerVariable(this->maxHealth_,        VariableDirection::ToClient);
160        registerVariable(this->shieldHealth_,     VariableDirection::ToClient);
161        registerVariable(this->maxShieldHealth_,  VariableDirection::ToClient);
162        registerVariable(this->shieldAbsorption_, VariableDirection::ToClient);
163        registerVariable(this->bReload_,          VariableDirection::ToServer);
164        registerVariable(this->aimPosition_,      VariableDirection::ToServer);  // For the moment this variable gets only transfered to the server
165    }
166
167    void Pawn::tick(float dt)
168    {
169        SUPER(Pawn, tick, dt);
170
171        this->bReload_ = false;
172
173        // TODO: use the existing timer functions instead
174        if(this->reloadWaitCountdown_ > 0)
175        {
176            this->decreaseReloadCountdownTime(dt);
177        }
178        else
179        {
180            this->addShieldHealth(this->getReloadRate() * dt);
181            this->resetReloadCountdown();
182        }
183
184        if (GameMode::isMaster())
185        {
186            if (this->health_ <= 0 && bAlive_)
187            {
188                this->fireEvent(); // Event to notify anyone who wants to know about the death.
189                this->death();
190            }
191        }
192    }
193
194    void Pawn::preDestroy()
195    {
196        // yay, multiple inheritance!
197        this->ControllableEntity::preDestroy();
198        this->PickupCarrier::preDestroy();
199    }
200
201    void Pawn::setPlayer(PlayerInfo* player)
202    {
203        ControllableEntity::setPlayer(player);
204
205        if (this->getGametype())
206            this->getGametype()->playerStartsControllingPawn(player, this);
207    }
208
209    void Pawn::removePlayer()
210    {
211        if (this->getGametype())
212            this->getGametype()->playerStopsControllingPawn(this->getPlayer(), this);
213
214        ControllableEntity::removePlayer();
215    }
216
217
218    void Pawn::setHealth(float health)
219    {
220        this->health_ = std::min(health, this->maxHealth_); //Health can't be set to a value bigger than maxHealth, otherwise it will be reduced at first hit
221    }
222
223    void Pawn::setShieldHealth(float shieldHealth)
224    {
225        this->shieldHealth_ = std::min(shieldHealth, this->maxShieldHealth_);
226    }
227
228    void Pawn::setMaxShieldHealth(float maxshieldhealth)
229    {
230        this->maxShieldHealth_ = maxshieldhealth;
231    }
232
233    void Pawn::setReloadRate(float reloadrate)
234    {
235        this->reloadRate_ = reloadrate;
236    }
237
238    void Pawn::setReloadWaitTime(float reloadwaittime)
239    {
240        this->reloadWaitTime_ = reloadwaittime;
241    }
242
243    void Pawn::decreaseReloadCountdownTime(float dt)
244    {
245        this->reloadWaitCountdown_ -= dt;
246    }
247
248    void Pawn::damage(float damage, float healthdamage, float shielddamage, Pawn* originator)
249    {
250        // Applies multiplier given by the DamageBoost Pickup.
251        if (originator)
252            damage *= originator->getDamageMultiplier();
253
254        if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
255        {
256            if (shielddamage >= this->getShieldHealth())
257            {
258                this->setShieldHealth(0);
259                this->setHealth(this->health_ - (healthdamage + damage));
260            }
261            else
262            {
263                this->setShieldHealth(this->shieldHealth_ - shielddamage);
264
265                // remove remaining shieldAbsorpton-Part of damage from shield
266                shielddamage = damage * this->shieldAbsorption_;
267                shielddamage = std::min(this->getShieldHealth(),shielddamage);
268                this->setShieldHealth(this->shieldHealth_ - shielddamage);
269
270                // set remaining damage to health
271                this->setHealth(this->health_ - (damage - shielddamage) - healthdamage);
272            }
273
274            this->lastHitOriginator_ = originator;
275        }
276    }
277
278    void Pawn::customDamage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
279    {
280        int collisionShapeIndex = this->isMyCollisionShape(cs);
281        orxout() << collisionShapeIndex << endl;
282
283        // Applies multiplier given by the DamageBoost Pickup.
284        if (originator)
285            damage *= originator->getDamageMultiplier();
286
287        orxout() << "damage(): Custom collision detected on " << this->getRadarName() << ", CS: " << cs << endl;
288
289        if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
290        {
291            if (shielddamage >= this->getShieldHealth())
292            {
293                this->setShieldHealth(0);
294                this->setHealth(this->health_ - (healthdamage + damage));
295            }
296            else
297            {
298                this->setShieldHealth(this->shieldHealth_ - shielddamage);
299
300                // remove remaining shieldAbsorpton-Part of damage from shield
301                shielddamage = damage * this->shieldAbsorption_;
302                shielddamage = std::min(this->getShieldHealth(),shielddamage);
303                this->setShieldHealth(this->shieldHealth_ - shielddamage);
304
305                // set remaining damage to health
306                this->setHealth(this->health_ - (damage - shielddamage) - healthdamage);
307            }
308
309            this->lastHitOriginator_ = originator;
310        }
311    }
312
313// TODO: Still valid?
314/* HIT-Funktionen
315    Die hit-Funktionen muessen auch in src/orxonox/controllers/Controller.h angepasst werden! (Visuelle Effekte)
316
317*/
318    void Pawn::hit(Pawn* originator, const Vector3& force, float damage, float healthdamage, float shielddamage)
319    {
320        if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator) && (!this->getController() || !this->getController()->getGodMode()) )
321        {
322            this->damage(damage, healthdamage, shielddamage, originator);
323            this->setVelocity(this->getVelocity() + force);
324        }
325    }
326
327    void Pawn::customHit(Pawn* originator, const Vector3& force, const btCollisionShape* cs, float damage, float healthdamage, float shielddamage)
328    {
329        if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator) && (!this->getController() || !this->getController()->getGodMode()) )
330        {
331            this->customDamage(damage, healthdamage, shielddamage, originator, cs);
332            this->setVelocity(this->getVelocity() + force);
333        }
334    }
335
336    void Pawn::hit(Pawn* originator, btManifoldPoint& contactpoint, float damage, float healthdamage, float shielddamage)
337    {
338        if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator) && (!this->getController() || !this->getController()->getGodMode()) )
339        {
340            this->damage(damage, healthdamage, shielddamage, originator);
341
342            if ( this->getController() )
343                this->getController()->hit(originator, contactpoint, damage); // changed to damage, why shielddamage?
344        }
345    }
346
347    void Pawn::customHit(Pawn* originator, btManifoldPoint& contactpoint, const btCollisionShape* cs, float damage, float healthdamage, float shielddamage)
348    {
349        if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator) && (!this->getController() || !this->getController()->getGodMode()) )
350        {
351            this->customDamage(damage, healthdamage, shielddamage, originator, cs);
352
353            if ( this->getController() )
354                this->getController()->hit(originator, contactpoint, damage); // changed to damage, why shielddamage?
355        }
356    }
357
358
359    void Pawn::kill()
360    {
361        this->damage(this->health_);
362        this->death();
363    }
364
365    void Pawn::spawneffect()
366    {
367        // play spawn effect
368        if (!this->spawnparticlesource_.empty())
369        {
370            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
371            effect->setPosition(this->getPosition());
372            effect->setOrientation(this->getOrientation());
373            effect->setDestroyAfterLife(true);
374            effect->setSource(this->spawnparticlesource_);
375            effect->setLifetime(this->spawnparticleduration_);
376        }
377    }
378
379
380    void Pawn::death()
381    {
382        this->setHealth(1);
383        if (this->getGametype() && this->getGametype()->allowPawnDeath(this, this->lastHitOriginator_))
384        {
385            // Set bAlive_ to false and wait for PawnManager to do the destruction
386            this->bAlive_ = false;
387
388            this->setDestroyWhenPlayerLeft(false);
389
390            if (this->getGametype())
391                this->getGametype()->pawnKilled(this, this->lastHitOriginator_);
392
393            if (this->getPlayer() && this->getPlayer()->getControllableEntity() == this)
394            {
395                // Start to control a new entity if you're the master of a formation
396                if(this->hasSlaves())
397                {
398                    Controller* slave = this->getSlave();
399                    ControllableEntity* entity = slave->getControllableEntity();
400
401
402                    if(!entity->hasHumanController())
403                    {
404                        // delete the AIController // <-- TODO: delete? nothing is deleted here... should we delete the controller?
405                        slave->setControllableEntity(0);
406
407                        // set a new master within the formation
408                        orxonox_cast<FormationController*>(this->getController())->setNewMasterWithinFormation(orxonox_cast<FormationController*>(slave));
409
410                        // start to control a slave
411                        this->getPlayer()->startControl(entity);
412                    }
413                    else
414                    {
415                        this->getPlayer()->stopControl();
416                    }
417
418                }
419                else
420                {
421                    this->getPlayer()->stopControl();
422                }
423            }
424            if (GameMode::isMaster())
425            {
426//                this->deathEffect();
427                this->goWithStyle();
428            }
429        }
430    }
431    void Pawn::goWithStyle()
432    {
433        this->bAlive_ = false;
434        this->setDestroyWhenPlayerLeft(false);
435
436        BigExplosion* chunk = new BigExplosion(this->getContext());
437        chunk->setPosition(this->getPosition());
438        chunk->setVelocity(this->getVelocity());
439
440        this->explosionSound_->setPosition(this->getPosition());
441        this->explosionSound_->play();
442    }
443    void Pawn::deatheffect()
444    {
445        // play death effect
446        {
447            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
448            effect->setPosition(this->getPosition());
449            effect->setOrientation(this->getOrientation());
450            effect->setDestroyAfterLife(true);
451            effect->setSource("Orxonox/explosion2b");
452            effect->setLifetime(4.0f);
453        }
454        {
455            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
456            effect->setPosition(this->getPosition());
457            effect->setOrientation(this->getOrientation());
458            effect->setDestroyAfterLife(true);
459            effect->setSource("Orxonox/smoke6");
460            effect->setLifetime(4.0f);
461        }
462        {
463            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
464            effect->setPosition(this->getPosition());
465            effect->setOrientation(this->getOrientation());
466            effect->setDestroyAfterLife(true);
467            effect->setSource("Orxonox/sparks");
468            effect->setLifetime(4.0f);
469        }
470        for (unsigned int i = 0; i < this->numexplosionchunks_; ++i)
471        {
472            ExplosionChunk* chunk = new ExplosionChunk(this->getContext());
473            chunk->setPosition(this->getPosition());
474        }
475    }
476
477    void Pawn::fired(unsigned int firemode)
478    {
479        if (this->weaponSystem_)
480            this->weaponSystem_->fire(firemode);
481    }
482
483    void Pawn::reload()
484    {
485        this->bReload_ = true;
486    }
487
488    void Pawn::postSpawn()
489    {
490        this->setHealth(this->initialHealth_);
491        if (GameMode::isMaster())
492            this->spawneffect();
493    }
494
495    /* WeaponSystem:
496    *   functions load Slot, Set, Pack from XML and make sure all parent-pointers are set.
497    *   with setWeaponPack you can not just load a Pack from XML but if a Pack already exists anywhere, you can attach it.
498    *       --> e.g. Pickup-Items
499    */
500    void Pawn::addWeaponSlot(WeaponSlot * wSlot)
501    {
502        this->attach(wSlot);
503        if (this->weaponSystem_)
504            this->weaponSystem_->addWeaponSlot(wSlot);
505    }
506
507    WeaponSlot * Pawn::getWeaponSlot(unsigned int index) const
508    {
509        if (this->weaponSystem_)
510            return this->weaponSystem_->getWeaponSlot(index);
511        else
512            return 0;
513    }
514
515    void Pawn::addWeaponSet(WeaponSet * wSet)
516    {
517        if (this->weaponSystem_)
518            this->weaponSystem_->addWeaponSet(wSet);
519    }
520
521    WeaponSet * Pawn::getWeaponSet(unsigned int index) const
522    {
523        if (this->weaponSystem_)
524            return this->weaponSystem_->getWeaponSet(index);
525        else
526            return 0;
527    }
528
529    void Pawn::addWeaponPack(WeaponPack * wPack)
530    {
531        if (this->weaponSystem_)
532        {
533            this->weaponSystem_->addWeaponPack(wPack);
534            this->addedWeaponPack(wPack);
535        }
536    }
537
538    void Pawn::addWeaponPackXML(WeaponPack * wPack)
539    {
540        if (this->weaponSystem_)
541        {
542            if (!this->weaponSystem_->addWeaponPack(wPack))
543                wPack->destroy();
544            else
545                this->addedWeaponPack(wPack);
546        }
547    }
548
549    WeaponPack * Pawn::getWeaponPack(unsigned int index) const
550    {
551        if (this->weaponSystem_)
552            return this->weaponSystem_->getWeaponPack(index);
553        else
554            return 0;
555    }
556
557    //Tell the Map (RadarViewable), if this is a playership
558    void Pawn::startLocalHumanControl()
559    {
560//        SUPER(ControllableEntity, changedPlayer());
561        ControllableEntity::startLocalHumanControl();
562        this->isHumanShip_ = true;
563    }
564
565    void Pawn::changedVisibility(void)
566    {
567        SUPER(Pawn, changedVisibility);
568
569        // enable proper radarviewability when the visibility is changed
570        this->RadarViewable::settingsChanged();
571    }
572
573
574    // A function to check if this pawn's controller is the master of any formationcontroller
575    bool Pawn::hasSlaves()
576    {
577        for (ObjectList<FormationController>::iterator it =
578             ObjectList<FormationController>::begin();
579             it != ObjectList<FormationController>::end(); ++it )
580        {
581            // checks if the pawn's controller has a slave
582            if (this->hasHumanController() && it->getMaster() == this->getPlayer()->getController())
583                return true;
584        }
585        return false;
586    }
587
588    // A function that returns a slave of the pawn's controller
589    Controller* Pawn::getSlave(){
590        for (ObjectList<FormationController>::iterator it =
591                ObjectList<FormationController>::begin();
592                it != ObjectList<FormationController>::end(); ++it )
593        {
594            if (this->hasHumanController() && it->getMaster() == this->getPlayer()->getController())
595                return it->getController();
596        }
597        return 0;
598    }
599
600
601    void Pawn::setExplosionSound(const std::string &explosionSound)
602    {
603        if(explosionSound_ )
604            explosionSound_->setSource(explosionSound);
605        else
606            assert(0); // This should never happen, because soundpointer is only available on master
607    }
608
609    const std::string& Pawn::getExplosionSound()
610    {
611        if( explosionSound_ )
612            return explosionSound_->getSource();
613        else
614            assert(0);
615        return BLANKSTRING;
616    }
617
618    // WIP function that (once I get it working) determines to which attached entity a collisionshape belongs.
619    // Shame that this doesn't seem to work as intended. It behaves differently (different number of childshapes) every reload. D:
620    int Pawn::isMyCollisionShape(const btCollisionShape* cs)
621    {
622        // This entities WECS
623        WorldEntityCollisionShape* ownWECS = this->getWorldEntityCollisionShape();
624
625        // e.g. "Box 4: Searching for CS 0x1ad49200"
626        orxout() << this->getRadarName() << ": Searching for CS " << cs << endl;
627        // e.g. "Box 4 is WorldEntityCollisionShape 0x126dd060"
628        orxout() << "  " << this->getRadarName() << " is WorldEntityCollisionShape " << ownWECS << endl;
629        // e.g. "Box 4 is objectID 943"
630        orxout() << "  " << this->getRadarName() << " is objectID " << this->getObjectID() << endl;
631
632        // print child shapes of this WECS
633        printChildShapes(ownWECS, 2, 0);
634
635        // end
636        orxout() << "  " << this->getRadarName() << ": no matching CS found." << endl;
637        return -1;
638    }
639
640    void Pawn::printChildShapes(CompoundCollisionShape* cs, int indent, int subshape)
641    {
642        // e.g. "  Childshape 1 (WECS 0x126dc8c0) has 2 childshapes:"
643        printSpaces(indent);  orxout() << "Childshape " << subshape << " (WECS " << cs << ") has " << cs->getNumChildShapes() << " childshapes:" << endl;
644
645        for (int i=0; i < cs->getNumChildShapes(); i++)
646        {
647            // For each childshape, print:
648            // pointer to the btCollisionShape
649            printSpaces(indent+2);  orxout() << "Bt-Childshape " << i << ": " << cs->getAttachedShape(i)->getCollisionShape() << endl;
650
651            // pointer to the CollisionShape
652            printSpaces(indent+2);  orxout() << "Orx-Childshape " << i << ": " << cs->getAttachedShape(i) << endl;
653
654            // parentID of the CollisionShape
655            printSpaces(indent+2);  orxout() << "ParentID of CS " << i << ": " << cs->getAttachedShape(i)->getparentID() << endl;
656
657            // if the childshape is a CompoundCollisionShape, print its children.
658            if (orxonox_cast<CompoundCollisionShape*>(cs->getAttachedShape(i)))
659            {
660                printChildShapes((CompoundCollisionShape*)(cs->getAttachedShape(i)), indent+2, i);
661            }
662        }
663    }
664
665    void Pawn::printSpaces(int number)
666    {
667        for(int i=0; i<number; i++)
668            orxout() << " ";
669    }
670}
Note: See TracBrowser for help on using the repository browser.