Changeset 1896 in orxonox.OLD for orxonox/trunk/core/world.cc
- Timestamp:
- May 20, 2004, 1:01:57 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/core/world.cc
r1883 r1896 33 33 lastNPC = null; 34 34 lastEnv = null; 35 lastShoot = null; 35 36 } 36 37 … … 128 129 129 130 /** 130 \brief Remove Non-Player-Character 131 \brief Add environmental object 132 \param player A reference to the new env object 133 134 Add a new Environment to the world. Env has to be initialised before. 135 */ 136 bool World::addShoot(ShootLaser* shoot) 137 { 138 shootList* listMember = new shootList; 139 listMember->shoot = shoot; 140 if ( lastShoot != null ) 141 { 142 listMember->number = lastShoot->number + 1; 143 listMember->next = lastShoot; 144 } 145 else 146 { 147 listMember->number = 0; 148 listMember->next = null; 149 } 150 lastShoot = listMember; 151 } 152 153 154 /** 155 \brief Remove Non-Player Character 131 156 \param player A reference to the new npc object 132 157 … … 162 187 } 163 188 /* now draw the rest of the world: environement */ 164 /* second draw all npcs */165 189 envList* tmpEnv = lastEnv; 166 190 while( tmpEnv != null ) … … 169 193 tmpEnv = tmpEnv->next; 170 194 } 171 172 /* 173 glColor3f(0.0, 1.0, 0.0); 174 glBegin(GL_LINES); 175 for (int x = 0; x <= 35; x += 5) 176 { 177 glVertex3f((float)x, -10.0, 0.0); 178 glVertex3f((float)x, 200.0, 0.0); 179 180 glVertex3f(-(float)x, -10.0, 0.0); 181 glVertex3f(-(float)x, 200.0, 0.0); 182 } 183 for (int x = -10; x<= 200; x += 5) 184 { 185 glVertex3f(-50.0, (float)x, 0.0); 186 glVertex3f(50.0, (float)x, 0.0); 187 } 188 glEnd(); 189 */ 190 195 /* now draw all the shoots (many) */ 196 shootList* tmpShoot = lastShoot; 197 while( tmpShoot != null ) 198 { 199 (*tmpShoot->shoot).drawShoot(); 200 tmpShoot = tmpShoot->next; 201 } 191 202 192 203 glColor3f(0.0, 1.0, 0.0);
Note: See TracChangeset
for help on using the changeset viewer.