Ignore:
Timestamp:
10/03/16 17:45:46 (9 years ago)
Author:
epyon
Message:
  • ecs updates
  • animation updates
  • ragdoll manager
  • lua has own random engine
  • several minor fixes
  • particle engine/particle group
  • shitload of other stuff
  • bullet world
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/engine/particle_manager.cc

    r518 r520  
    6161        data->emitter_count   = 0;
    6262        data->affector_count  = 0;
    63 
    64         const_string orientation = table.get_string( "orientation", "point" );
    65         if ( orientation == "point" )                     { data->orientation = particle_orientation::POINT; }
    66         else if ( orientation == "oriented" )             { data->orientation = particle_orientation::ORIENTED; }
    67         else if ( orientation == "oriented_common" )      { data->orientation = particle_orientation::ORIENTED_COMMON; }
    68         else if ( orientation == "perpendicular" )        { data->orientation = particle_orientation::PERPENDICULAR; }
    69         else if ( orientation == "perpendicular_common" ) { data->orientation = particle_orientation::PERPENDICULAR_COMMON; }
    70         else
    71         {
    72                 NV_LOG_ERROR( "Unknown orientation type! (", orientation, ")!" );
    73                 data->orientation = particle_orientation::POINT;
    74         }
    75 
    76         const_string origin = table.get_string( "origin", "center" );
    77         if      ( origin == "center" )        { data->origin = particle_origin::CENTER; }
    78         else if ( origin == "top_left" )      { data->origin = particle_origin::TOP_LEFT; }
    79         else if ( origin == "top_center" )    { data->origin = particle_origin::TOP_CENTER; }
    80         else if ( origin == "top_right" )     { data->origin = particle_origin::TOP_RIGHT; }
    81         else if ( origin == "center_left" )   { data->origin = particle_origin::CENTER_LEFT; }
    82         else if ( origin == "center_right" )  { data->origin = particle_origin::CENTER_RIGHT; }
    83         else if ( origin == "bottom_left" )   { data->origin = particle_origin::BOTTOM_LEFT; }
    84         else if ( origin == "bottom_center" ) { data->origin = particle_origin::BOTTOM_CENTER; }
    85         else if ( origin == "bottom_right" )  { data->origin = particle_origin::BOTTOM_RIGHT; }
    86         else
    87         {
    88                 NV_LOG_ERROR( "Unknown particle origin! (", origin, ")!" );
    89                 data->origin = particle_origin::CENTER;
    90         }
     63        data->orientation     = particle_orientation( table.get_unsigned("orientation", 0) );
     64        data->origin          = particle_origin( table.get_unsigned( "origin",0  ) );
    9165
    9266        data->common_up  = math::normalize( table.get<vec3>("common_up",  vec3(1,0,0) ) );
Note: See TracChangeset for help on using the changeset viewer.