예제 #1
0
sanguis::server::entities::optional_transfer_result
sanguis::server::entities::with_ghosts::on_transfer(
	sanguis::server::entities::transfer_parameters const &_parameters
)
{
	return
		sanguis::server::entities::optional_transfer_result{
			sanguis::server::entities::transfer_result{
				fcppt::algorithm::map_concat<
					sanguis::collision::world::body_enter_container
				>(
					ghosts_,
					[
						&_parameters,
						this
					](
						sanguis::server::collision::ghost &_ghost
					)
					{
						return
							_ghost.transfer(
								_parameters.world(),
								_parameters.center()
							);
					}
				)
			}
		};
}
예제 #2
0
sanguis::server::entities::optional_transfer_result
sanguis::server::entities::friend_::on_transfer(
	sanguis::server::entities::transfer_parameters const &_parameters
)
{
	if(
		sanguis::server::collision::with_world(
			_parameters.center(),
			this->radius(),
			_parameters.grid()
		)
	)
		return
			sanguis::server::entities::optional_transfer_result();

	// TODO: Why?
	sanguis::server::entities::with_auras::on_transfer(
		_parameters
	);

	return
		sanguis::server::entities::with_velocity::on_transfer(
			_parameters
		);
}