X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FSprite.cpp;h=14a0e9eb6829df8164790145502f1f35aed63812;hb=5931bd1edf827e8645f89b5a4a16585cb25bc6e1;hp=174caa6a9d5fb73c74c016409733b7b66893ae87;hpb=87ff660bf58766ab705a749e72e04154ccf5a737;p=lugaru.git diff --git a/Source/Sprite.cpp b/Source/Sprite.cpp index 174caa6..14a0e9e 100644 --- a/Source/Sprite.cpp +++ b/Source/Sprite.cpp @@ -209,7 +209,7 @@ void Sprite::Draw() } lasttype = sprites[i]->type; lastspecial = sprites[i]->special; - glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix + glMatrixMode(GL_MODELVIEW); glPushMatrix(); glTranslatef(sprites[i]->position.x, sprites[i]->position.y, sprites[i]->position.z); if ((sprites[i]->type == flamesprite || sprites[i]->type == weaponflamesprite || sprites[i]->type == weaponshinesprite)) { @@ -330,25 +330,25 @@ void Sprite::Draw() float rotationpoint; int whichtri; - for (j = 0; j < numplayers; j++) { - if (!spritehit && player[j].dead && sprites[i]->alivetime > .1) { + for (j = 0; j < Person::players.size(); j++) { + if (!spritehit && Person::players[j]->dead && sprites[i]->alivetime > .1) { where = sprites[i]->oldposition; - where -= player[j].coords; - if (!player[j].skeleton.free) - where = DoRotation(where, 0, -player[j].yaw, 0); + where -= Person::players[j]->coords; + if (!Person::players[j]->skeleton.free) + where = DoRotation(where, 0, -Person::players[j]->yaw, 0); startpoint = where; where = sprites[i]->position; - where -= player[j].coords; - if (!player[j].skeleton.free) - where = DoRotation(where, 0, -player[j].yaw, 0); + where -= Person::players[j]->coords; + if (!Person::players[j]->skeleton.free) + where = DoRotation(where, 0, -Person::players[j]->yaw, 0); endpoint = where; movepoint = 0; rotationpoint = 0; - whichtri = player[j].skeleton.drawmodel.LineCheck(&startpoint, &endpoint, &footpoint, &movepoint, &rotationpoint); + whichtri = Person::players[j]->skeleton.drawmodel.LineCheck(&startpoint, &endpoint, &footpoint, &movepoint, &rotationpoint); if (whichtri != -1) { spritehit = 1; - player[j].DoBloodBigWhere(0, 160, sprites[i]->oldposition); + Person::players[j]->DoBloodBigWhere(0, 160, sprites[i]->oldposition); DeleteSprite(i); } }