[Change] When creating a new pilot with pilot.add(), pretend to enter from hyperspace if we have a large distance from planet.
This commit is contained in:
		
							parent
							
								
									87771ab892
								
							
						
					
					
						commit
						1becd0d68a
					
				| @ -237,8 +237,13 @@ static int pilot_addFleet(lua_State* L) { | ||||
|           RNG(75, 150) * (RNG(0,1) ? 1 : -1)); | ||||
| 
 | ||||
|       /* Set velocity only if no position is set.. */ | ||||
|       if(lv != NULL) | ||||
|         vectnull(&vv); | ||||
|       if(lv != NULL) { | ||||
|         if(VMOD(lv->vec) > MIN_HYPERSPACE_DIST) { | ||||
|           a = vect_angle(&vp, &vn); | ||||
|           vect_pset(&vv, plt->ship->speed * 3., a); | ||||
|         } | ||||
|         else vectnull(&vv); | ||||
|       } | ||||
|       else { /* Enterting via hyperspace. */ | ||||
|         a = vect_angle(&vp, &vn); | ||||
|         vect_pset(&vv, plt->ship->speed * 3., a); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Allanis
						Allanis