Changeset 8946
- Timestamp:
- Nov 23, 2011, 3:13:31 PM (13 years ago)
- Location:
- code/branches/environment3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/environment3/data/levels/asteroidField.oxw
r8919 r8946 37 37 <?lua 38 38 dofile("includes/asteroidField.lua") 39 asteroidField(0, 0, 0, 150, 50, 12000, 250) 39 asteroidField(0, 0, 5000, 100, 150, 2000, 50); 40 asteroidBelt(0, 0, 0, -48, -34, 30, 100, 200, 17000, 21000, 900) 40 41 ?> 41 42 -
code/branches/environment3/data/levels/includes/asteroidField.lua
r8919 r8946 10 10 do 11 11 size = (math.random() * (maxSize - minSize)) + minSize 12 pX = (2 * math.random() * radius) - radius + posX 13 pY = (2 * math.random() * radius) - radius + posY 14 pZ = (2 * math.random() * radius) - radius + posZ 12 15 print("<StaticEntity ") 13 16 14 17 print("position = \"") 15 print( (2 * math.random() * radius) - radius + posX) print(",")16 print( (2 * math.random() * radius) - radius + posY) print(",")17 print( (2 * math.random() * radius) - radius + posZ) print("\"")18 print(pX) print(",") 19 print(pY) print(",") 20 print(pZ) print("\"") 18 21 19 22 print("scale = \"") print(size) print("\"") 20 23 21 print("collisionType = static linearDamping = 0.8 angularDamping = 0 collisiondamage = 1enablecollisiondamage = true>")24 print("collisionType = static linearDamping = 0.8 angularDamping = 1 collisiondamage = 1000 enablecollisiondamage = true>") 22 25 print("<attached> <Model mass=\"") print(size * 10) print("\" mesh=\"ast") print(math.mod(i,6) + 1) print(".mesh\" /> </attached>") 23 print("<attached> <ForceField position=\"0,0,0\" mode=\"newtonianGravity\" diameter=\"") print(size + (size * 0.2)) print("\" massDiameter=\"") print(size) print("\" mass=\"") print(size * 1000) print("\" /> </attached>")24 print("<collisionShapes> <SphereCollisionShape radius=\"") print(size ) print("\" /> </collisionShapes>")26 print("<attached> <ForceField position=\"0,0,0\" mode=\"newtonianGravity\" diameter=\"") print(size * 2.7) print("\" massDiameter=\"") print(size * 2) print("\" mass=\"") print(size * 1000) print("\" /> </attached>") 27 print("<collisionShapes> <SphereCollisionShape radius=\"") print(size*2.5) print("\" /> </collisionShapes>") 25 28 print("</StaticEntity>") 26 29 end 30 end 31 32 33 --[[ asteroid belt generator 34 generates asteroid belt 35 posX, posY, posZ - position in space 36 yaw, pitch - rotation 37 minSize, maxSize - size boundaries of each asteroid 38 radius0, radius1 - inner/outer radius 39 count - number of asteroids 40 --]] 41 function asteroidBelt(centerX, centerY, centerZ, yaw, pitch, segments, minSize, maxSize, radius0, radius1, count) 42 dPhi = (2 * math.pi) / segments 43 width = math.abs(radius1 - radius0) 44 radius = (radius1 + radius0) / 2 45 segmentCount = count / segments 27 46 47 print("<StaticEntity collisionType=static yaw=") 48 print(yaw) 49 print(" pitch=") 50 print(pitch) 51 print(" position = \"") 52 print(centerX) print(",") 53 print(centerY) print(",") 54 print(centerZ) print("\"") 55 print(">") 56 print("<attached>") 57 58 for i = 0, segments - 1, 1 59 do 60 asteroidField((radius * math.cos(i * dPhi)), 61 (radius * math.sin(i * dPhi)), 62 0, minSize, maxSize, width,segmentCount) 63 end 64 65 print("</attached>") 66 print("</StaticEntity>") 28 67 end -
code/branches/environment3/src/libraries/util/SignalHandler.cc
r8919 r8946 70 70 71 71 catchSignal( SIGSEGV ); 72 // catchSignal( SIGABRT ); 72 // catchSignal( SIGABRT ); // CEGUI nasty bugfix 73 73 catchSignal( SIGILL ); 74 74 } … … 127 127 if( SignalHandler::singletonPtr_s == 0 ) 128 128 { 129 orxout(user_error) << "Received signal (sigHandler already destroyed)" << sigName.c_str() << endl << "Can't write backtrace because SignalHandler is already destroyed" << endl;129 orxout(user_error) << "Received signal " << sigName.c_str() << endl << "Can't write backtrace because SignalHandler is already destroyed" << endl; 130 130 exit(EXIT_FAILURE); 131 131 } … … 137 137 138 138 139 orxout(user_error) << "Received signal (second error)" << sigName.c_str() << endl << "Try to write backtrace to file orxonox_crash.log" << endl;139 orxout(user_error) << "Received signal " << sigName.c_str() << endl << "Try to write backtrace to file orxonox_crash.log" << endl; 140 140 141 141 … … 675 675 676 676 /// Returns a description of the given exception. 677 // Based on code from Dr. Mingw by Jos éFonseca677 // Based on code from Dr. Mingw by Jos\E9 Fonseca 678 678 /* static */ std::string SignalHandler::getExceptionType(PEXCEPTION_POINTERS pExceptionInfo) 679 679 { … … 745 745 746 746 /// Retrieves the base address of the module that contains the specified address. 747 // Code from Dr. Mingw by Jos éFonseca747 // Code from Dr. Mingw by Jos\E9 Fonseca 748 748 /* static */ DWORD SignalHandler::getModuleBase(DWORD dwAddress) 749 749 {
Note: See TracChangeset
for help on using the changeset viewer.